Hi, I was trying to write raku/perl6 version of the sed code listed in
this article:

"How to sed remove last character from each line"
https://www.cyberciti.biz/faq/sed-remove-last-character-from-each-line/

What I came up with was two one-liners. But the first one-liner using
the "-ne" flag works, while the second one-liner using the "-pe" flag
fails.

mbook:~ homedir$ cat demo1.txt
this is a test,
I love Unix,
I like Linux too,
mbook:~ homedir$ perl6 -ne 'put .chop' demo1.txt
this is a test
I love Unix
I like Linux too
mbook:~ homedir$ perl6 -pe '.chop' demo1.txt
this is a test,
I love Unix,
I like Linux too,
mbook:~ homedir$

Can anyone explain this inconsistency?

Thanks, Bill.

Reply via email to