in reply to Re^13: Is there any difference between prototype % and @ ?
in thread Is there any difference between prototype % and @ ?
> And so far; neither you nor I have come up with a use case.
trivial example
%salary=( boss => 1_000, secretary => 300, admin => 600, janitor => 150, ); print map {"$_ earns $salary{$_} \n" } sort { $salary{$a} <=> $salary{$b} } grep { $salary{$_} > 500 } keys %salary;
translating it to hmap, hsort and hgrep is left as an excercise.
Cheers Rolf
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^15: Is there any difference between prototype % and @ ?
by BrowserUk (Patriarch) on Feb 24, 2013 at 08:37 UTC | |
by LanX (Saint) on Feb 24, 2013 at 09:55 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2013 at 10:16 UTC | |
by LanX (Saint) on Feb 24, 2013 at 11:04 UTC | |
by BrowserUk (Patriarch) on Feb 24, 2013 at 11:18 UTC | |
|
In Section
Seekers of Perl Wisdom