in reply to file test results not as expected
You need to use the full path to the file for the file test. Change:
to:if (-f -x $file) {
if (-f -x "$path/$file") {
This is how I do it: Finding commands in Unix PATH:
findcmd is a script which searches through the directories
in the Unix PATH variable for executable files
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: file test results not as expected
by navalned (Beadle) on Nov 22, 2020 at 00:00 UTC |
In Section
Seekers of Perl Wisdom