Skip to content

Instantly share code, notes, and snippets.

@axiak
Created July 23, 2010 23:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axiak/488217 to your computer and use it in GitHub Desktop.
Save axiak/488217 to your computer and use it in GitHub Desktop.
#!/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