Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created November 21, 2016 12:02
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 dogbert17/511c3dd5f6524278d9a0623204be40c0 to your computer and use it in GitHub Desktop.
Save dogbert17/511c3dd5f6524278d9a0623204be40c0 to your computer and use it in GitHub Desktop.
List.from
=head2 method from
Assumes the list contains L«C<Match> objects|/type/Match» and returns the
value of C<.from> called on the first element of the list.
'abcdefg' ~~ /(c)(d)/;
say $/.list.from; # 2
"abc123def" ~~ m:g/\d/;
say $/.list.from; # 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment