in reply to Re: Naming Subs
in thread Naming Subs
Update: removed an duplicate copy of the go_north line thanks to pfaut.my %valid_commands = ( jump => \&jump, map { my ($code, $cmds) = @$_; map { $_ => $code }, @$cmds; } [ \&go_north => [qw(north n)] ], [ \&go_south => [qw(south s)] ], [ \&go_west => [qw(west w)] ], [ \&go_east => [qw(east e)] ], [ \&get => [qw(get take)] ], [ \&quit => [qw(quit exit end)] ], );
Makeshifts last the longest.
|
---|