Skip to content

Instantly share code, notes, and snippets.

@Timbus
Last active August 29, 2015 14:00
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 Timbus/415d0d358e676afae647 to your computer and use it in GitHub Desktop.
Save Timbus/415d0d358e676afae647 to your computer and use it in GitHub Desktop.
I.. uh
my $test-str = "asdf\nfdsa\nqwer\nrewq\n\nffff\ndddd";
> my ($map, $words) = $test-str.split("\n\n"); $map .= split("\n"); $map.perl
().list.item
> my ($map, $words) = $test-str.split("\n\n"); $map .= split("\n");
asdf fdsa qwer rewq
> $map.perl
("asdf", "fdsa", "qwer", "rewq").list.item
#Also this:
> my ($map, $words) = $test-str.split("\n\n")>>.split("\n").tree
#Empty
> my ($map, $words) = $test-str.split("\n\n")>>.split("\n").lol
#Empty again
#Works without assignment.
> $test-str.split("\n\n")>>.split("\n").lol.perl
LoL.new(("asdf", "fdsa", "qwer", "rewq").list.item, ("ffff", "dddd").list.item)
#Works if I don't actually perform the splitting..
> my ($map, $words) = LoL.new(("asdf", "fdsa", "qwer", "rewq").list.item, ("ffff", "dddd").list.item)
asdf fdsa qwer rewq ffff dddd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment