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

Re: eval order of args to a sub

by ikegami (Patriarch)
on May 30, 2007 at 19:56 UTC ( [id://618297]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >perl -le"$i=3; print($i+0, ++$i, $i+0);"
    344
    
  2. or download this
    >perl -le"$i=3; print($i, ++$i, $i);"
    444
    
  3. or download this
    # $i=3; print($i+0, ++$i, $i+0);
    $i = 3;
    ...
       $anon1 = $i+0;  alias $_[2] = $anon1;
       &print
    };
    
  4. or download this
    # $i=3; print($i, ++$i, $i);
    $i = 3;
    ...
       $i;         alias $_[2] = $i;
       &print
    };
    
  5. or download this
    perl -le"$i=3; sub { $_[1]++; print @_ }->($i+0, ++$i, $i+0, $i);"
    

Log In?
Username:
Password:

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

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

    No recent polls found