abdan has asked for the wisdom of the Perl Monks concerning the following question:
How do we have CLI of Perl's sed's n command ?
e.g. illustration:
cat script.txt| perl -nle 'if (/^===\w+\s*$/){ next # ??? how to ignor +e first $_, here eg. ===Hello, to directly become replaced by next li +ne ; # ... } print'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Must have CLI of Perl's sed's n command
by Tux (Canon) on Jun 30, 2022 at 06:35 UTC | |
by abdan (Acolyte) on Jun 30, 2022 at 10:10 UTC | |
by Anonymous Monk on Jun 30, 2022 at 11:31 UTC | |
Re: Must have CLI of Perl's sed's n command
by Fletch (Bishop) on Jun 30, 2022 at 02:02 UTC | |
by LanX (Saint) on Jun 30, 2022 at 02:34 UTC | |
by abdan (Acolyte) on Jun 30, 2022 at 02:10 UTC | |
by choroba (Cardinal) on Jun 30, 2022 at 05:50 UTC | |
Re: Must have CLI of Perl's sed's n command
by haukex (Archbishop) on Jun 30, 2022 at 07:23 UTC |
Back to
Seekers of Perl Wisdom