in reply to How to collect the stdout of a subroutine call?
Make sure you return the value in your sub routine. Something like:
my $variable = results(); sub results { # ... do something that will give $foo the stuff you want # to return ... return $foo; }
|
|---|