Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: scanning hash

by bageler (Hermit)
on Aug 01, 2004 at 15:06 UTC ( #379085=note: print w/replies, xml ) Need Help??


in reply to Re^3: scanning hash
in thread scanning hash

need to change that slightly so it will return true if all the keys are undef:
return 0 unless defined $_ ? $_ eq $value : defined $value ? 0 : 1

Replies are listed 'Best First'.
Re^5: scanning hash
by Aristotle (Chancellor) on Aug 01, 2004 at 15:09 UTC

    No, I don't.

    $ perl -le'print undef eq undef' 1

    Update: oh, I see what made you think that. I had to NOT my XOR condition. I forgot that XOR produces false rather than true if both operands are equal.

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://379085]
help
Chatterbox?
[LanX]: hmm   Chatterbox FAQ doesn't talk about breaking up long words
[marto]: breakin' up is hard to do
[LanX]: 123456789012345678 90 123456789012345678 901234567890
LanX should break up with false friends ;)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-07-24 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (350 votes). Check out past polls.