Jenda Krynicky wrote:

> It might be quicker ...
>
> while (<>) {
>         chomp;
>         print "\tOK ($_)\n"
>                 if do {(local $_ = lc($_)) =~ tr/aeiou//dc;
>                         /a/ and /e/ and /i/ and /o/ and /u/
>                 }
> }

> ... the loop it could look like this:
>
> while ($line = <>) {
>         chomp($line);
>         local $_ = lc($_);
>         tr/aeiou//dc;
>         print "\tOK ($line)\n"
>                 if (/a/ and /e/ and /i/ and /o/ and /u/);
> }
>
> ...
> while (<>) {
>         chomp;
>         print "\tOK ($_)\n"
>                 if do {(local $_ = lc($_)) =~ tr/aeiou//dc;
>                         length($_) >=5 and /a/ and /e/ and /i/ and /o/ and /u/
>                 }
> }
>
> or
>
> while ($line = <>) {
>         chomp($line);
>         local $_ = lc($_);
>         tr/aeiou//dc;
>         print "\tOK ($line)\n"
>                 if (length($_) >=5 and /a/ and /e/ and /i/ and /o/ and /u/);
> }

Uh, what I actually did to test was:

#!/usr/bin/perl -w

use strict;
use warnings;

$_ = "But oh, I get mad!";
if (/a/i and /e/i and /i/i and /o/i and /u/i) {print;}
else {print "Failed. $!\n";}

Seemed easy enough ~( :- |) )

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to