good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
$0 inconsistency?by misterperl (Pilgrim) |
on Apr 13, 2022 at 13:35 UTC ( [id://11142953]=perlquestion: print w/replies, xml ) | Need Help?? |
misterperl has asked for the wisdom of the Perl Monks concerning the following question:
I have a statement like :
print F "$0:$t\n"; SOMETIMES it prints:and other times the same exact statement prints:
Which is unexpected, fairly annoying, and inconvenient , since later when I grep the file for $0, SOMETIMES the path is there, sometimes not. And which variety is used in the grep is also consequential, and indeterminate. Is there some other perlvar, or some context, where $0 would include the path, and sometimes not? Perl v5.16.3 Also, on other nodes (dev and qa) this code worked 100% - no paths. This all started when the code was copied to another CENTOS node. TY Perl Dieties esp Damian!
Back to
Seekers of Perl Wisdom
|
|