Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Variable as name of array

by choroba (Bishop)
on Nov 01, 2012 at 22:56 UTC ( #1001882=note: print w/replies, xml ) Need Help??


in reply to Re^3: Variable as name of array
in thread Variable as name of array

Or even, horrors, a slice:
use Data::Dumper; my @names = qw/ A B C D /; my %order; @order{ @names } = @names; print Dumper \%order; __END__ Prints: $VAR1 = { 'A' => 'A', 'D' => 'D', 'C' => 'C', 'B' => 'B' };
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001882]
help
Chatterbox?
and the monks are chillaxin'...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2017-10-18 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (240 votes). Check out past polls.

    Notices?