Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001872]
[Discipulus]: Tomas in greek ~140Ad
[Discipulus]: also the 'today bred' was probably 'tomorrow's bred'
[LanX]: Novum Testamentum Graece
[erix]: "give us today our bread from tomorrow" -- that's not going to fly
[choroba]: "for tomorrow"
[Discipulus]: Let's perl: from cpan website how can thou/you tell how many namespaces are beyond App::* ?
[choroba]: Map of CPAN
[LanX]: cpan serach?
[Discipulus]: about bred: 'let our bred levitate (well)'
[Discipulus]: I love maps!

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-11-23 20:50 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (338 votes). Check out past polls.