Skip to content

Instantly share code, notes, and snippets.

@perlpilot
Created July 27, 2010 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlpilot/492542 to your computer and use it in GitHub Desktop.
Save perlpilot/492542 to your computer and use it in GitHub Desktop.
=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