in reply to Simple Perl Question: Printing the Return Value of a Function
Now there can be some glitches. If the function call returns an array, and you try to catch it in $return, you may only get the first array element. But that is what the perldocs are for. They tell you what the methods return.use Data::Dumper; my $return = $object->function_call(); print "$return\n"; # will tell you what the ref type is print Dumper( [ \$return ] ), "\n";
|
|---|