my $number = 2; my $word = ${my %x; @x{qw(1 2 3)} = qw(one two three); \%x}{$number};
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Defining an anonymous hash with slices and lists.
by merlyn
in thread Defining an anonymous hash with slices and lists.
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |