develooper Front page | perl.perl5.porters | Postings from October 2021

Re: Pre-RFC: command-line flag for slurping

Thread Previous
Oodler 577 via perl5-porters
October 19, 2021 19:37
Re: Pre-RFC: command-line flag for slurping
Message ID:
* Joseph Brenner <> [2021-10-19 12:25:48 -0700]:

> Oodler 577 via perl5-porters <> wrote:
> >If it's going to be equivalent to "-0777", which directly impacts the record
> separator, then "-R" is probably better.
> I thought we could do better than that, but maybe not... of the
> available choices -R isn't bad.  The remaining unused single ascii
> letters are:
>     b g j k o q r y z A B G H J K L N O P Q R Y Z
> Though there are some numerics also:
>    -1  do it in one gulp (confusable with -l, though)
> Possibly:
>   -o  do it in "one" gulp (myself I'd keep it in case there's a need
> for "output")
> Maybe:
>    -N  the "opposite" of -n
>    -P  the "opposite" of -p
> so instead of, say, -nR or -pR you could just use -N or -P


In awk, "RS" is the the "record separator" (like Perl's $/); so
any combination of "[rR][sS]" might do - I understand we're working
with just single character options, so the "r" and the "s" would
be defined such that the combination "RS" does the right thing - I'm
not sure if that's possible but if it is, this wwould be the most
historically relevant approach.

That said, Perl reappropriates a lot of stuff from awk, e.g., "BEGIN"
and "END".

Thanks for the comment.


SDF-EU Public Access UNIX System - #openmp #pdl #native

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About