$i=0; if ($i++) { print 'first=' , $i, ', '; } if ($i++) { print 'middle=' , $i, ', '; } if ($i++) { print 'last=' , $i, ', '; } if ($i++) { print 'beyond=' , $i, ', '; } #### $i=0; if ($i++) { print 'first=' , $i - 1, ', '; } if ($i++) { print 'middle=' , $i - 1, ', '; } if ($i++) { print 'last=' , $i - 1, ', '; } if ($i++) { print 'beyond=' , $i - 1, ', '; } #### $i=0; print 'first=' , $i, ', ' if $i; $i++; print 'middle=', $i, ', ' if $i; $i++; print 'last=' , $i, ', ' if $i; $i++; print 'beyond=', $i if $i; $i++; #### my $i=0; outputter('first', $i++); outputter('middle', $i++); outputter('last', $i++); outputter('beyond', $i++); sub outputter { my ($txt, $i) = @_; print "$txt=$i, " if $i; }