SPUG: Hashes and subroutines
Michael R. Wolf
MichaelRWolf at att.net
Mon Jan 5 18:48:50 PST 2009
On Jan 5, 2009, at 4:26 PM, jerry gay wrote:
>
>
> my $actions = {
> play => \&sub1,
> that => \&sub2,
> funky => \&sub3,
> music => \&sub4,
> };
>
> $actions->{$var}->(@arguments);
>
> more advanced techniques can be found in chapter 4 of "higher order
> perl", which i believe is freely available online.
> ~jerry
Here's the PDF link.
http://hop.perl.plover.com/book/pdf/04Iterators.pdf
There's also a MOD (M's Old Documentation?) link, that's an MJD
variant of POD elsewhere on his site.
--
Michael R. Wolf
All mammals learn by playing!
MichaelRWolf at att.net
More information about the spug-list
mailing list