myuserid7 has asked for the wisdom of the Perl Monks concerning the following question:
I have a troublesome script which is causing some grief.
I've simplified it to a few lines, but the output is confusing me. It seems that tr or basename are being called somewhere without paths.
The script fails on Debian 3.0, but works on Fedora.
Here it is:
The script fails on Debian 3.0, but works on Fedora.
Here it is:
And here is the error:#!/usr/bin/perl -w use strict; $ENV{'PATH'}=''; # removing this line makes it work open (MAILQ, "/usr/bin/mailq |") or die "open failed: $!\n";
/usr/bin/mailq: basename: No such file or directory /usr/bin/mailq: tr: No such file or directory
Updated Steve_p - changed pre tags to code tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: PATH/tr/basename mystery
by Roy Johnson (Monsignor) on Apr 14, 2005 at 11:54 UTC | |
by myuserid7 (Scribe) on Apr 14, 2005 at 12:01 UTC | |
Re: PATH/tr/basename mystery
by gellyfish (Monsignor) on Apr 14, 2005 at 12:03 UTC |
Back to
Seekers of Perl Wisdom