tty1x has asked for the wisdom of the Perl Monks concerning the following question:
my @email = <OPENFILE>; close OPENFILE; my $count; foreach my $email (@email){ if ($email =~ /mailto:/) { $count += 1; } print $count; # error here }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: counter for each regex match.
by davido (Cardinal) on May 04, 2013 at 06:05 UTC | |
by tty1x (Novice) on May 04, 2013 at 12:51 UTC | |
|
Re: counter for each regex match.
by Laurent_R (Canon) on May 04, 2013 at 08:16 UTC | |
|
Re: counter for each regex match.
by kcott (Archbishop) on May 04, 2013 at 10:45 UTC | |
by tty1x (Novice) on May 04, 2013 at 12:53 UTC |