The stupid question is the question not asked | |
PerlMonks |
Translating JS into Perlby ron.savage (Acolyte) |
on Feb 18, 2009 at 22:22 UTC ( [id://744899]=perlquestion: print w/replies, xml ) | Need Help?? |
ron.savage has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks
The JS in question is:
unary = empty[ tagName ] || !!unary;
where unary in an incoming function parameter and empty is a hash.
What I don't get it the idiom !!unary.
I'm thinking it could be null upon entry, so the first ! is causing it to be defined if necessary, and the second ! is reverting it to it's 'proper' value.
Back to
Seekers of Perl Wisdom
|
|