Last active
January 13, 2017 12:08
-
-
Save ceving/728a490b616ef4aafc0a9ef5f2d272ae to your computer and use it in GitHub Desktop.
Execute a regular expression on a list of strings
This file contains 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 | |
my $rs = shift; | |
my $rx = qr/$rs/; | |
for (@ARGV) { | |
exit 1 unless /$rx/; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment