Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: completing perl record separators



Oliver Kiddle wrote on Sat, 29 May 2021 21:59 +00:00:
> The perl -0 and -l options allow for record separators to be specified
> in octal which is perhaps useful on quick one-liners if you happen
> to know the ASCII table in octal well.

Indeed it is:

% print -rl -- '"foo bar"' '' 'baz' | xargs  
foo bar baz
% print -rl -- '"foo bar"' '' 'baz' | perl -012l040pe1; echo
"foo bar"  baz 
%

Not bad for a one-byte program :-)

Cheers,

Daniel
(The final «1» is the only byte of Perl source code in that invocation;
it's the argument to the «-e» flag.)




Messages sorted by: Reverse Date, Date, Thread, Author