in reply to Re: Vowel search
in thread Vowel search
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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Vowel search
by Jim (Curate) on Jun 11, 2014 at 22:04 UTC | |
by AnomalousMonk (Archbishop) on Jun 11, 2014 at 22:47 UTC | |
by tye (Sage) on Jun 12, 2014 at 01:43 UTC | |
by AnomalousMonk (Archbishop) on Jun 12, 2014 at 04:03 UTC | |
by Jim (Curate) on Jun 11, 2014 at 23:13 UTC | |
|
Re^3: Vowel search
by kennethk (Abbot) on Jun 12, 2014 at 15:24 UTC | |
by AnomalousMonk (Archbishop) on Jun 12, 2014 at 23:25 UTC |