Created
November 9, 2012 12:45
-
-
Save jluis/4045508 to your computer and use it in GitHub Desktop.
alternativa para Grep.pm
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
# | |
# Text matching function (feel free to use) | |
# | |
# returns: first match or undef | |
# | |
sub match_text { | |
my ( $pattern, $content ) = @_; | |
$content =~ /$pattern/p; | |
return ${^MATCH}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment