Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: eval order of args to a sub

by graq (Curate)
on May 31, 2007 at 07:25 UTC ( #618418=note: print w/ replies, xml ) Need Help??


in reply to Re: eval order of args to a sub
in thread eval order of args to a sub

Can you guess what the following prints?
perl -le"$i=3; sub { $_1++; print @_ }->($i+0, ++$i, $i+0, $i);"

That's a sneaky one! I was completely wrong:
syntax error at -e line 1, near "="

PS: Just joking with you :)

-=( Graq )=-


Comment on Re^2: eval order of args to a sub
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-12-25 03:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls