Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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: (6)
As of 2018-12-14 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (69 votes). Check out past polls.

    Notices?