develooper Front page | perl.perl6.users | Postings from August 2020

liens and :chomp question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
August 30, 2020 05:14
Subject:
liens and :chomp question
Message ID:
db790b01-e9e5-f908-f75d-1870506e3a4e@zoho.com
Hi All,

I am trying to figure out how to use line with :$chomp.
Now what am I doing wrong?


$ alias p6
alias p6='perl6 -e'

$ p6 'say "Lines.txt".IO.open.lines(:chomp)[3,2];'
(Line 3 Line 2)

$ p6 'say "Lines.txt".IO.open.lines(:!chomp)[3,2];'
(Line 3 Line 2)

I am looking for

Line 3
Line 2

Many thanks,
-T

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