Say you have a directory d:bin and you want to add it to path environment at the beginning of your Perl script. Following code will do the trick.
my $dir="d:\bin";
$ENV{PATH}.=";$dir";
Then $dir will be included in new $ENV{PATH}
Say you have a directory d:bin and you want to add it to path environment at the beginning of your Perl script. Following code will do the trick.
my $dir="d:\bin";
$ENV{PATH}.=";$dir";
Then $dir will be included in new $ENV{PATH}
Leave a Reply
You must be logged in to post a comment.