Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Determine largest key in hash

by MidLifeXis (Prior)
on Oct 04, 2011 at 17:56 UTC ( #929620=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash = (
       1 => [
    ...
          { name => "Fiona", event => "I saw Fiona!" },
       ],
    );
    
  2. or download this
    for my $trigger ( @{ $hash{$cnt} || [] } ) {
        # Do work here with $trigger ....
    }
    
  3. or download this
    my @data = (
       [        # 0 (remember, we are zero-based)
    ...
          { name => "Fiona", event => "I saw Fiona!" },
       ],
    );
    
  4. or download this
    for my $trigger ( @{ $data[$cnt-1] || [] } ) {
        # Do work here with $trigger ....
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-09-01 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (6 votes), past polls