in reply to How do I Set the Correct Path for system calls?

This may be a moot point if you *really* couldn't find out where your gzip program is, but shouldn't it sort of scare you to just call an external program without specifying the absolute path to it?

I personally REALLY don't like relying on PATH when you are calling something from a script.

Of course, it may not make that much of a difference, but I would recommend hardcoding the location in your script. Maybe

<cdde> my $gzip_cmd = '/usr/local/bin/gzip'; # or use vars qw/ $gzip_cmd/ ; # global # or %cmds = ( gzip => '/usr/local/bin/gzip' ); </code>

Or some such thing. Just my $0.02

  • Comment on Re: How do I Set the Correct Path for system calls?