Perl: Returning Values
Returning Values
$a = "George"; $b = "Jetson";
$name = cat($a, $b); # $name = "George Jetson";
return "$_[0] $_[1]"; # return the two arguments
} # concatenated together
A value (or list of values) can be returned by a subroutine
To get these values, just assign your subroutine call to a variable