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; }
--
b10m

All code is usually tested, but rarely trusted.