Created
July 27, 2010 17:20
-
-
Save perlpilot/492542 to your computer and use it in GitHub Desktop.
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
=begin programlisting | |
my $s = 'the quick brown fox jumped over the the lazy dog'; | |
my $word = rx/ \w+ [ \' \w+]? /; | |
if $s ~~ m/ ($word) \W+ $0 / { | |
say "Found '$0' twice in a row"; | |
} | |
=end programlisting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment