in reply to Re: Live operations-per-second counter
in thread Live operations-per-second counter

if ($counter =~ /00$/) {
can be written as
if ($counter % 100 == 0) {
which saves perl from converting the number to a string and checking it against a regexp.

Replies are listed 'Best First'.
Re^3: Live operations-per-second counter
by blazar (Canon) on Mar 21, 2005 at 07:16 UTC
    if ($counter % 100 == 0) {
    Or even
    unless ($counter % 100) {
    (But then it depends on how much one is familiar with such a construct - for me it is quite as intuitive as the former, but it's obvious that others' mileage may vary)