Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by ed_hoch (Sexton)
on Aug 03, 2013 at 15:44 UTC ( [id://1047720]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    (time ? @a=() : $a) = Foo();
    
  2. or download this
    ~home>perl -MO=Concise, -ce '$z = (time ? @x=() : $x) = 365'
    e  <@> leave[1 ref] vKP/REFC ->(end)
    ...
    -        <1> ex-rv2sv sKRM*/1 ->d
    c           <$> gvsv(*z) s ->d
    -e syntax OK
    
  3. or download this
    ~home>perl -MO=Concise, -ce '$z = (time ? (@x=()) : $x) = 365'
    Assignment to both a list and a scalar at -e line 1, at EOF
    ...
    f                    <$> gvsv(*x) s ->b
    -        <1> ex-rv2sv sK/1 ->d
    c           <$> gvsv(*z) s ->d
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-18 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found