develooper Front page | perl.perl6.users | Postings from October 2019

must chomp input files (was Re: processing a file in chunks)

Thread Next
From:
yary
Date:
October 20, 2019 23:40
Subject:
must chomp input files (was Re: processing a file in chunks)
Message ID:
CAG2CFAa+VB+yz99cEor0fa5_QAwcQ6_Oc0z6-H2LjsyqarEmLw@mail.gmail.com
It seems that *ARGFILES is opened with :chomp=True, so adding :!chomp to
the lines call is too late.

$ perl6 -e "say 11; say 22; say 33;" | perl6 -e '.say for lines(:chomp)'

*11*

*22*

*33*

$ perl6 -e "say 11; say 22; say 33;" | perl6 -e '.say for lines(:!chomp)'

*11*

*22*

*33*

-y

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About