in reply to Mysterious for behavior
The comma operator in this case is presenting a list of three elements to the initializer of the for operator. If you had something like this:
you would get four lines, because there are four elements.for ($i=3, $i=2, $i=1, $i=0)
It is printing "1" for each input because the initializer list is evaulated before the iteration. Therefore, $i is set to one before the for operator iterates over the three element list.
In Section
Seekers of Perl Wisdom