in reply to Re^2: pass perl variable to shell script
in thread pass perl variable to shell script
So if you only have to pass one value you simply print it to standard output in Perl.
If you must pass more than one variable you e.g. print them in a certain format "$var1=$var2=$var3" and parse that on the shell side.#in perl-script "script.pl" print $variable; #in the shell-script: variable=$(perl script.pl) echo $variable
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: pass perl variable to shell script
by arthurs (Novice) on Aug 11, 2010 at 17:01 UTC | |
by Anonymous Monk on Aug 11, 2010 at 17:05 UTC | |
by arthurs (Novice) on Aug 11, 2010 at 19:52 UTC | |
by morgon (Priest) on Aug 11, 2010 at 21:11 UTC | |
by aquarium (Curate) on Oct 14, 2010 at 04:41 UTC | |
by choroba (Cardinal) on Aug 11, 2010 at 17:20 UTC |