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

Re: Re: While on hashes doesn't work?

by merlyn (Sage)
on Feb 04, 2002 at 23:38 UTC ( [id://143318]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (($_) = sort keys %data){ 
     
     print "while: $data{$_}\n"; 
     delete $data{$_}; 
    }
    
  2. or download this
    while (my ($k, $v) = each %data) {
      print "key is $k, value 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://143318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-28 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found