if ($file =~ /[aeiou]{2}/i) { ... }
Another small point: case-insensitive matching (enabled by the /i regex modiifer (which I see you snuck in there)) imposes a run-time penalty which will become noticable, at a wild guess, for files of more than several thousand lines. Maybe use
$file =~ m{ [AaEeIiOoUu]{2} }xms
to avoid this overhead. Of course, another approach would be to common-case all lines before matching...
In reply to Re^2: Vowel search
by AnomalousMonk
in thread Vowel search
by Noob@Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |