in reply to idiom question

If $counter is initially 0, then the print won't get executed, because the post-increment $foo++ operator takes the value of $foo first, then increments it, so your code ends up as:
0 and print "..." if ...
If you change it to ++$counter, which increments, then takes the new value, it will probably do what you think it should.

Replies are listed 'Best First'.
Re: Re: idiom question
by geektron (Curate) on Jan 18, 2004 at 07:22 UTC
    you know, i should have remembered that. but i didn't.

    pre-increment would have DWIM.