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

print particular lines question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
August 25, 2020 02:35
Subject:
print particular lines question
Message ID:
7de9801e-4cd6-5e9c-4c44-03b4feb992a0@zoho.com
Hi All,

I seems I should know how to do this, but
I am drawing a blank.

$ cat Lines.txt | raku -ne 'say $_;'
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11


I want to print liens 1, 3, and 7.

Assigning  `my @x=$_.lines` puts everything into $x[0]


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