Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

RE: undefs and functions

by reptile (Monk)
on Aug 02, 2000 at 03:42 UTC ( #25635=note: print w/ replies, xml ) Need Help??


in reply to undefs and functions

The following seems to have worked, but for calling on methods, you're probably still stuck (i didn't try, though, so it might work too). Just an example:

my %foo = ( 'bar' => {'baz' => 1} ); print $foo{'baz'}->{'bar'} || 'oops';

which prints 'oops' because there is no 'bar' in %foo.

Update I misunderstood the question I think, but I tested this below and it still followed the same principle:

my %foo = ( 'bar' => undef ); print $foo{'bar'}->{'baz'} || "oops";

No warnings under -w or use strict.

local $_ = "0A72656B636148206C72655020726568746F6E41207473754A"; while(s/..$//) { print chr(hex($&)) }


Comment on RE: undefs and functions
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2015-07-29 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls