for (@Subscription) { Display_Subs(\%$_); }
\%$_ says to take a reference to a hash $_ and de-reference it as a hash %$_ and then take a reference to that hash \%$_. Since you are not modifying that hash you could just do:
for (@Subscription) { Display_Subs($_); }
sub List_Subscriptions { my (@Sub_ARRAY) = @{$_[0]}; # my (@Sub_ARRAY) = @_; print "The Current Subscription List:\n\n"; for (@Sub_ARRAY) { print " \t$_ \n"; } print "\n\n"; }
You are de-referencing the array (copying the whole array) when you could just use the reference:
sub List_Subscriptions { my ($Sub_ARRAY) = @_; # my (@Sub_ARRAY) = @_; print "The Current Subscription List:\n\n"; for (@$Sub_ARRAY) { print " \t$_ \n"; } print "\n\n"; }
In reply to Re: How can I send a "transposed slice" of an array of hashes and by extension an array of arrays, or hash of hashes to a subroutine
by jwkrahn
in thread How can I send a "transposed slice" of an array of hashes and by extension an array of arrays, or hash of hashes to a subroutine
by ObiPanda
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |