[qadmin@concon qw]$ perl -e ' $gamedir = "fortress"; $HOME = $ENV{'HOME'}; $mapname = "2fort5"; if ( -f "$HOME/$gamedir/maps/$mapname.bsp" ) { print "It exists!\n" } +else { print "$!\n" }; ' It exists! [qadmin@concon qw]$ perl -e ' $gamedir = "fortress"; $HOME = $ENV{'HOME'}; $mapname = "2fort5qra"; if ( -f "$HOME/$gamedir/maps/$mapname.bsp" ) { print "It exists!\n" } +else { print "$!\n" }; ' No such file or directory [qadmin@concon qw]$
Since the script uses other means whereby to get these values and it doesn't work vs my putting these values in by hand where I know there are no hidden characters I can deduce that there must be some hidden character slipping in somewhere in the runtime of the script. I don't see why there would be a '\r' in this thing but it is possible so I will try that out and see how I fare. A '\r' seems like the most logical thing that could be flubbing this up.
Thanks fellow monks. I will let everyone know the outcome once I am done.
----------
- Jim
In reply to Re: Re: From chat to here :) chdir() and test -f issues.
by snafu
in thread From chat to here :) chdir() and test -f issues.
by snafu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |