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

Re(3): how to avoid mis-spelling hash keys?

by BrentDax (Hermit)
on Jan 06, 2003 at 23:01 UTC ( #224780=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: how to avoid mis-spelling hash keys?
in thread how to avoid mis-spelling hash keys?

   if( $self­->{$a­ttrib­ute} ){
That will fail if $self->{$attribute} is set to zero, the empty string, or undef. Perhaps this would work better:

   if(exists $self->{$attribute}) {

=cut
--Brent Dax
There is no sig.


Comment on Re(3): how to avoid mis-spelling hash keys?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-11-28 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (196 votes), past polls