Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Variable as name of array

by tobyink (Abbot)
on Nov 01, 2012 at 21:05 UTC ( #1001872=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @names = qw(A B C D);
    for (my $i=0; $i<4; $i++) {
    ...
    
    use Data::Dumper;
    print Dumper(\@A, \@B, \@C, \@D);
    
  2. or download this
    use strict;
    
    ...
    
    use Data::Dumper;
    print Dumper(@ARRAYS{@names});
    
  3. or download this
    use strict;
    
    ...
    
    use Data::Dumper;
    print Dumper(\@A, \@B, \@C, \@D);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-09-15 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls