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

Checking if hash value exists without implicitly defining it

by Doctrin (Beadle)
on Feb 14, 2013 at 15:20 UTC ( #1018739=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $Hash{44.52}{param1}{key1} = [101.01,'val1'];
    $Hash{95.01}{param2}{key2} = [101.02,'val2'];
    
  2. or download this
    my $neededVal = 80.0;
    if (defined $Hash{$neededVal}{param1}{key1}) {
    ...
    print "$_\n"; #this prints 80.0 as a KEY (among the others)!!! How?..
    }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2018-08-17 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (176 votes). Check out past polls.

    Notices?