-
-
Save Ovid/fc552949223750349a8b to your computer and use it in GitHub Desktop.
Why does this show empty strings?
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
# Given: | |
# $ cat plans.csv | |
# this,that | |
# one,two | |
# same,same | |
my $fh = open('plans.csv'); | |
for $fh.lines.grep({ / $<key>=\w+ ',' $<value>=\w+ / }) { | |
say ~$<key> => ~$<value>; | |
} | |
# Output: | |
# "" => "" | |
# "" => "" | |
# "" => "" | |
# This is perl6 version 2014.12 built on MoarVM version 2014.12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment