zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: PATCH: completing perl record separators
Date: Sun, 30 May 2021 12:48:09 +0000	[thread overview]
Message-ID: <e3294b3f-4f73-4c59-860d-3d346791b5fb@www.fastmail.com> (raw)
In-Reply-To: <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.)


      parent reply	other threads:[~2021-05-30 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 21:59 Oliver Kiddle
2021-05-29 23:24 ` Bart Schaefer
2021-05-30  0:11   ` Oliver Kiddle
2021-05-30 17:42     ` Bart Schaefer
2021-05-30 12:48 ` Daniel Shahaf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3294b3f-4f73-4c59-860d-3d346791b5fb@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).