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

Re^2: Multiple if-else statements using C-style ternary operator

by JavaFan (Canon)
on Jul 11, 2011 at 23:04 UTC ( [id://913800]=note: print w/replies, xml ) Need Help??


in reply to Re: Multiple if-else statements using C-style ternary operator
in thread Multiple if-else statements using C-style ternary operator

my %status_message = { 2 => 'HIGH', 1=>'MODERATE', 0=>'LOW' };
That's not what you want. That creates a hash with a key of the form "HASH(0xDEADBEEF)", and an undefined value has the value.

Perhaps you intended to write paren instead?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 20:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found