Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Associative array

by ELISHEVA (Prior)
on Jul 13, 2009 at 06:50 UTC ( [id://779476]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @data_list = ( { correct => 42 } );
    
  2. or download this
      foreach my $k (keys %data_list) {
         my $v = $data_list->{$k};
         print "The value for $k is $v\n";
      }
    
  3. or download this
       for (my $i=0; $i < $#data_list; $i+=2) {
         my $k = $data_list[$i];
         my $v = $data_list[$i+1];
         print "The value for $k is $v\n";
      }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2024-04-16 19:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found