Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Using ternary operator as lvalue in push

by ikegami (Patriarch)
on Jul 31, 2007 at 16:50 UTC ( [id://629868]=note: print w/replies, xml ) Need Help??


in reply to Re: Using ternary operator as lvalue in push
in thread Using ternary operator as lvalue in push

Is it done this way to allow the prototype to be checked at compile time?
>perl -c -e"sub t(\@) { @{$_[0]} = '!' } t($c?@a:@b); print @b; Type of arg 1 to main::t must be array (not null operation) at -e line + 1, near "@b)" -e had compilation errors.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-20 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found