Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completing perl record separators
- X-seq: zsh-workers 48957
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: completing perl record separators
- Date: Sun, 30 May 2021 12:48:09 +0000
- Archived-at: <https://zsh.org/workers/48957>
- In-reply-to: <69857-1622325582.238699@Vk1b.iYl2._452>
- List-id: <zsh-workers.zsh.org>
- References: <69857-1622325582.238699@Vk1b.iYl2._452>
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