BoulderBum has asked for the wisdom of the Perl Monks concerning the following question:
Clear enough, but to make sure I am following what is happening I tried writing it out the long way, and failed, telling me that I don't truly understand the concept of what is happening. Essentially I have this:while (<STDIN>) { if (/a/i && /e/i && /i/i && /o/i && /u/i)) { print; } }
I know it is something simple, but I can't put my finger on it... I'm sure everyone reading this sees how stupid I am being, so can someone let me in on the joke? Thanks.while ( defined ($line = <STDIN>) ) { if ($line =~ (/a/i && /e/i && /i/i && /o/i && /u/i)) { print $line; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Long Versions
by Joost (Canon) on Sep 26, 2007 at 23:19 UTC | |
Re: Long Versions
by Cristoforo (Curate) on Sep 26, 2007 at 23:21 UTC | |
Re: Long Versions
by BoulderBum (Novice) on Sep 27, 2007 at 00:33 UTC | |
Re: Long Versions
by cdarke (Prior) on Sep 27, 2007 at 09:59 UTC | |
Re: Long Versions
by Aim9b (Monk) on Sep 27, 2007 at 22:36 UTC | |
by Joost (Canon) on Sep 29, 2007 at 00:07 UTC | |
Re: Long Versions
by BoulderBum (Novice) on Sep 28, 2007 at 00:38 UTC |