in reply to how to get value of print command
Maybe this is what you want:
open( STDOUT, '>', \( my $output ) )
or die "Can't open in-memory file: $!";
print "Hello world!\n"; # prints to $output
print STDERR 'STDOUT: ' . $output;
STDOUT: Hello world!
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (518 votes). Check out past polls.