Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Evaluation Order again.

by Tanktalus (Canon)
on May 30, 2016 at 19:35 UTC ( [id://1164530]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Evaluation Order again.
in thread Evaluation Order again.

Ah, of course. That distinction becomes important so rarely for me that it's easy to forget. So, to remove the referencing, and make it show up "as expected", I just add zero to each item, and I get what I expect:

use strict; use warnings; sub func { print $_, ' ' for @_; print "\n"; $_[2]; } my $i = 3; my $rv = func(0+$i, 0+ ++$i, 0+$i+2);
And now I get my "3 4 6" - and everything makes sense again. See? I knew I did something wrong ;)

Log In?
Username:
Password:

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

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

    No recent polls found