Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Secret Perl Operators: the boolean list squash operator, x!!

by ikegami (Pope)
on Jul 31, 2006 at 17:58 UTC ( #564827=note: print w/ replies, xml ) Need Help??


in reply to Secret Perl Operators: the boolean list squash operator, x!!

Two people have already done
scalar x!! $cond
but the parens are required
( scalar ) x!! $cond

>perl -le "@a = 'test' x 0; print scalar @a" 1 >perl -le "@a = ('test') x 0; print scalar @a" 0


Comment on Re: Secret Perl Operators: the boolean list squash operator, x!!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-04 01:43 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 (57 votes), past polls