You do not say which operating system, so:
use warnings;
use strict;
my $sep = $^O eq 'MSWin32'?';':':';
$ENV{'PATH'} .= $sep . "directory to be added";
Note: this will only affect processes that the Perl script itself starts, using, for example, system or qx, it will not affect any others.
You do not make clear what PATH has to do with its input file. Is the inout file a script you are running? | [reply] [d/l] |
1) Show us what you are trying to do
2) Show us the code you have already
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
| [reply] |