in reply to Tuesday Evening Code Quiz
Well the previous answers of @foo{@a}= reverse @a; are simpler code, they still don't make a lot of sense. To make sense of it, you would write:
and then the reader of the code would realize which items "go together" and that %foo is a two-way lookup table. - tye (but my friends call me "Tye")my %foo= ( a=>3, b=>2, c=>1 ); @foo{values %foo}= keys %foo;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Tuesday Evening Code Quiz
by tilly (Archbishop) on Oct 31, 2001 at 02:42 UTC |