use Data::Dumper; my $return = $object->function_call(); print "$return\n"; # will tell you what the ref type is print Dumper( [ \$return ] ), "\n";