Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Subroutine question on use of uninitialized value.

by sauoq (Abbot)
on Jun 01, 2012 at 14:20 UTC ( #973778=note: print w/ replies, xml ) Need Help??


in reply to Re: Subroutine question on use of uninitialized value.
in thread Subroutine question on use of uninitialized value.

$ perl -we 'my $h={k=>undef}; print $h->{k} if exists $h->{k}' Use of uninitialized value in print at -e line 1.

This is why defined() may be preferable.

-sauoq
"My two cents aren't worth a dime.";


Comment on Re^2: Subroutine question on use of uninitialized value.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-08-23 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (175 votes), past polls