http://www.perlmonks.org?node_id=107384


in reply to a few basic questions

can't help with the last two questions (not sure what you mean with the second), but here's the first one:
my $counter = 0; while(1) { print "Got an even number\n" if(($counter++%2) == 0); }
This will only print when $counter is even...