Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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.";

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 about the Monastery: (5)
As of 2016-06-26 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.