I think the easy answer is backticks. Have your child script print the value, and have the parent script invoke with child as my $value = `perl script.pl`;
For more complex/robust options, follow Corion's advice.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: return a variable from command line execution to perl
by kennethk
in thread return a variable from command line execution to perl
by sss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |