Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by sauoq (Abbot)
on Jun 01, 2012 at 14:20 UTC ( [id://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.";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found