Created
July 23, 2010 23:39
-
-
Save axiak/488217 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $x = [qr/([aieou]+)/io, qr/(\d+)/o]; #<- Here is a list of 2 regexes... | |
my $line = <STDIN>; | |
foreach my $regex (@{$x}) { | |
if ($line =~ $regex) { | |
print "a vowel or digit!\n"; | |
last; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment