Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://224780]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2016-12-11 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.