more useful options | |
PerlMonks |
Re^3: Auto Increment "magic" Inquiryby roboticus (Chancellor) |
on Jan 04, 2007 at 22:22 UTC ( [id://593037]=note: print w/replies, xml ) | Need Help?? |
brusimm: It's consistent because Perl will generate the code the same way each time you compile it. However, another version of Perl may generate slightly different code for the same sequence. For example, suppose you have the statement $j = $i++ + $i++;. It's perfectly acceptable for perl to implement it as:
and it's also acceptable for it to implement it like:
(Other implementations are also possible...) So while any particular perl compiler will be consistent from run to run, and program to program, different perl compilers (version, platform, vendor, etc.) are free to do it another way. Your co-worker appears to know which way it's implemented on your perl compiler.
In Section
Seekers of Perl Wisdom
|
|