in reply to Interpolating variables from a file
I'm not quite understanding the flow here. Are you
1. reading in unix "shell" commands
2. trying to "fill" the shell variables via perl
3. execute the input via system, or backticks, or qx
And of course - all normal danger caveats do apply.$user = $ENV{USER}; $ENV{user} = $user; # Case sensitivity. Now $user should # be visible to your script snippets foreach $line (@lines) { system( $line ); }
-derby
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Interpolating variables from a file
by Rich36 (Chaplain) on Sep 19, 2001 at 01:28 UTC |