Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
... send_1( name => $name, filehandle => $pic, id => 'test' ); send_2( { name => $name, filehandle => $pic, id => 'test'} ); sub send_1 { my (%args) = @_; my $name = $args{ name } || ''; my $filehandle = $args{ filehandle } || ''; my $id = $args{ id } || ''; } sub send_2 { my $name = $_[0] || ''; my $filehandle = $_[1] || ''; my $id = $_[2] || ''; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More efficient ways to pass values to a sub routine
by haukex (Archbishop) on Jan 31, 2017 at 19:46 UTC | |
|
Re: More efficient ways to pass values to a sub routine
by toolic (Bishop) on Jan 31, 2017 at 19:47 UTC | |
|
Re: More efficient ways to pass values to a sub routine
by FreeBeerReekingMonk (Deacon) on Jan 31, 2017 at 19:55 UTC | |
|
Re: More efficient ways to pass values to a sub routine
by Cristoforo (Curate) on Jan 31, 2017 at 23:42 UTC |