>Homework help is a touchy subject on this list. What have you tried?
>
>Have you read:
>perldoc perlop
>perldoc perlretut
Yow! Ok, I have now. I suppose I've missed something, since I haven't yet come
up with a solution. :-\
>One sticky point with and/or is that you need to break complex
>statements into little parts and not try to put to much together at one
>time. Use LOTS of parentheses when you are first starting out.
>
>When it comes to this type of thing, the more specific your question the
>more likely you are to get a straight answer, because you have shown you
>are not just fishing for a completed assignment....
Sure thing. Here's the example we got for finding a word with no vowels:
foreach (@words) {
print "Hmm, the word '$_' doesn't contain any vowels!"
if !/a|e|i|o|u/;
}
And here's what I've done so far:
my @lines = <>;
foreach (@lines) {
# print $_ if /a|e|i|o|u/gi; # seems to correctly find a, or e, or i...
# print $_ if /[aeiou]/gi; # ditto
# print $_ if /a\&\&e\&\&i\&\&o\&\&u/gi; # try a logical "and", with escapes
# print $_ if /a&&e&&i&&o&&u/gi; # try it without the escapes
# print $_ if /a\&e\&i\&o\&u/gi; # try a bitwise "and", with escapes
# print $_ if !/[bcdfghjklmnpqrstvwxyz]/gi; # try not matching consonants
print $_ if /(a+)(e+)(i+)(o+)(u+)/gi; # "LOTS of parentheses"
}
AAAAAAAARRRRRRRRRRGGGGGGGGGGGGHHHHHHHHH!!!!!!!!!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]