method foo () {
... }
my $fh = open 'file'; # autochomp
my $fh = open 'file',:newlines; # non-autochomp
$fh.newline = "\r"; # now split on \r
$str = $fh.readline;
$str.newline; # \r
for chomp =$fh {... }
If.newline is set to a rule, then its captured variables are made available to the calling block as if it has done a matching.
# calling <ident>
&rule:<ident>.($?SELF: $state);
# calling <Grammar::ident>
&Grammar::rule:<ident>($Grammar: $state);
Day 141: Hackathon day #2: More revelations 0 Comments More | Login | Reply /