use warnings; use strict; my $flag_count = 0; while (<DATA>) { $flag_count++ while /<BEGIN_FLAG>/g } print "flag_count = $flag_count\n"; __DATA__ <BEGIN_FLAG> foo bar goo <BEGIN_FLAG> boo <BEGIN_FLAG> __END__ flag_count = 3
In reply to Re: Calculations in Regexp
by toolic
in thread Calculations in Regexp
by sumeetgrover
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |