in reply to multiple keys - one value
in thread using a hash of functions
If you're only duplicating one value, you can use
You have to use one variable per value though:my %h = ( HELP => $_ = sub {print "help\n"}, "?" => $_, SAVE => sub {print "save\n"}, );
my ($help, $save); my %h = ( HELP => $help = sub {print "help\n"}, "?" => $help, SAVE => $save = sub {print "save\n"}, EXIT => $save, );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: multiple keys - one value
by NetWallah (Canon) on Dec 04, 2003 at 06:39 UTC | |
by QM (Parson) on Dec 04, 2003 at 07:10 UTC | |
Re: Re: multiple keys - one value
by NetWallah (Canon) on Dec 05, 2003 at 05:58 UTC |
In Section
Seekers of Perl Wisdom