Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 exploiting the Monastery: (12)
As of 2015-07-31 07:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (275 votes), past polls