in reply to counter for each regex match.

G'day tty1x,

Changing my $count; to my $count = 0; should fix your "uninitialised value" problems.

[Aside: you can write ++$count; instead of $count += 1;]

-- Ken

Replies are listed 'Best First'.
Re^2: counter for each regex match.
by tty1x (Novice) on May 04, 2013 at 12:53 UTC
    Thanks for the  ++$count; tip :)