A subroutine can return only single value. That value could be scalar or reference of variable. If we want to return scalar(single) variable then we can do like..
return $a;
If want to return array list or hash list then we need to return reference of array or hash Consecutively like..
return \@name_of_array_variable;
return \%name_of_hash_variable;
Hope this will resolve the issue.
Originally posted as a Categorized Answer.
In reply to Re: How do you test for return type($,@,%)?
by bimleshsharma
in thread How do you test for return type($,@,%)?
by draco_iii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |