Voila.$pattern = "whatever"; $mode = "(?"; $mode .= "i" if $case_insensitive; $mode .= "s" if $dot_matches_all; $mode .= "m" if $multiline_match; $mode .= "x" if $allow_comments; $mode .= ")"; $count++ while $string =~ /$mode$pattern/o;
In reply to RE: RE: Count String Occurrences
by japhy
in thread Count String Occurrences
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |