Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
XP is just a number
 
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 musing on the Monastery: (18)
As of 2014-04-18 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls