Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: ternary operator as lvalue failing to induce evaluation of right-hand expression in list context

by Loops (Curate)
on Aug 03, 2013 at 16:21 UTC ( [id://1047722]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -MO=Deparse  -e 'sub Foo() {}; (time ? @a=() : $a) = Foo();'
    
  2. or download this
    sub Foo () {
        
    }
    time ? @a = () : $a = Foo;
    
  3. or download this
    perl -MO=Deparse  -e 'sub Foo() {}; (time ? @a : $a) = Foo();'
    
  4. or download this
    Assignment to both a list and a scalar at -e line 1, near ");"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-23 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found