http://www.perlmonks.org?node_id=127281

tame1 has asked for the wisdom of the Perl Monks concerning the following question:

Just wanted to get some opinions on this particular method of calling subroutines with arguments

my ($ret, $msg) = mysub( 'cat' => $val1, 'dog' => $val2 ); sub mysub { my $args = { 'cat' => undef, 'dog' => undef, @_ }; my $cat = $args->{'cat'}; my $dog = $args->{'dog'}; # do something with them if ($ok) { return($answer, undef); } else { return(undef, $error_msg); } }
Sort of like a poor man's prototyping?
At least I think it's better than "shift"ing to get arguments, etc. Everyone tell me if I am wrong, please!


What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"