Skip to content

Instantly share code, notes, and snippets.

@lucs
Last active December 13, 2015 00:43
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 lucs/bae8c4e4101d9476b661 to your computer and use it in GitHub Desktop.
Save lucs/bae8c4e4101d9476b661 to your computer and use it in GitHub Desktop.
Playing around with regex, I stumbled upon doing this:
say Match.new(
ast => "SSS",
list => (
Match.new(
ast => Any,
list => (),
hash => Map.new(()),
orig => "asdf",
to => 2,
from => 1
),
Match.new(
ast => Any,
list => (),
hash => Map.new(()),
orig => "asdf",
to => 4,
from => 2
)
),
hash => Map.new(
("" => [])
),
orig => "asdf",
to => 4,
from => 0
).perl;
and it prints:
Match.new(ast => Any, list => (), hash => Map.new(()), orig => "asdf", to => 4, from => 0)
Is that all there is?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment