Hi,
In one of my scripts I have to launch an external utility, and since it might
not be in the user path, I would like to add the target directory (or
directories) to the PATH environment. To be on the safe side, I want to
restore the original path after execution of the utility.
I thought of using:
{
local $ENV{PATH}.=":/new/path/to/use";
`externalUtility`;
}
The problem is that I want to do ".=", but at this point (because of "local"),
the original value is empty.
Is there a trick here to use, or should I do it by saving the old path, setting
the new one, restore the old value ?
Thanks
Yossi
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl