Your code at present will disregard a matching string on the first line. In addition, you read in the entire file at once, sucking up a good deal of memory if the file is quite large. Here's another way of doing it:
#!/usr/bin/perl -w use strict; # Or don't. See if I care. while (<>) { print if (/[Aa]/ && /[Ee]/ && /[Ii]/ && /[Oo]/ && /[Uu]/); }
I only used the character classes there because (I hear) they're faster than /i matches. Could be wrong on that count, though.
His Royal Cheeziness
In reply to Re: vowel_search
by CheeseLord
in thread vowel_search
by chainsawed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |