And its output:print "# File is located at: $myAbsPathToFile\n" if (-e $myAbsPathToFi +le); if (-s $myAbsPathToFile) { print "Good to go\n"; } else { print "# File $myAbsPathToFile is empty or missing: $!. Cannot con +tinue!\n"; exit; }
# File is located at: /nfs/home/frogsausage/file # File /nfs/home/frogsausage/file is empty or missing: No such file or + directory. Cannot continue!
Note how awkward it is: first test is saying "Can find it, it exists!", and the second says "Nope, no such file or directory". These lines are like that in the final code: no statements in between and it isn't part of a loop or anything like that.
Edit: @hdb Indeed! I corrected typo after edit. I converted full path to variable again hence why. Thanks for the head up. Output is still the same after the typo edit.
In reply to Re^2: -s test option returns differently in some cases
by frogsausage
in thread -s test option returns differently in some cases
by frogsausage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |