in reply to Passing a hash into a subroutine
sub new { my $package = shift; # implicitly passed by the new package syntax my %opts = @_; print $opt{foo}; }
|
---|
In Section
Seekers of Perl Wisdom
in reply to Passing a hash into a subroutine
sub new { my $package = shift; # implicitly passed by the new package syntax my %opts = @_; print $opt{foo}; }
|
---|