Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: hash and array mismatch

by TGI (Parson)
on May 10, 2007 at 17:31 UTC ( [id://614711]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach my $i ( 0..$#data ) {
       my %keys = keys %dataPos; # Changed  hash name to match hash OP is 
    +building
    ...
       
       print "$data[$i] -- > $i\n";        
    }
    
  2. or download this
    foreach my $i ( 0..$#data ) {
        my $key = $data[i];
    ...
        $dataPos{$key} = $i;
        print "$key -- > $i\n";        
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-25 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found