in reply to Bachelor of Arts?
So, the ++ operator has highest precedence. According to perlop it returns the value first then autoincrements it. Then $a is evlauated, then print. Step by step it looks like this:
Cheers,print $a, $a++; print $a, 'A'; #++returns $a prior to incrementing print 'B', 'A'; #$a is evaluated to it's after increment value of 'B'
Erik
Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet
|
---|
In Section
Seekers of Perl Wisdom