From: "Jörg Ziefle" <gt4556a@prism.gatech.edu>
To: zsh-users@sunsite.dk
Subject: Re: problem/bug: array definition from command (backticks)
Date: Wed, 27 Jun 2001 00:01:56 -0400 [thread overview]
Message-ID: <20010627000156.A14633@acmez.gatech.edu> (raw)
Usually, I don't f'up on my own postings, but hey, here's a somewhat
nicer version of my mail folder printer for future reference:
--- BEGIN printmailfolders-zsh.pl
#!/usr/bin/perl -w
use strict;
my @MAILDIRS = ("$ENV{HOME}/Mail", "$ENV{HOME}/savenews");
my @folders;
foreach my $MAILDIR (@MAILDIRS) {
opendir DIR, $MAILDIR;
push @folders, grep {! /^\./ && -r $_ && -f _ && ! -d _ && -s _ && -T _} map {"$MAILDIR/$_"} readdir DIR;
closedir DIR;
};
@folders = map { m,^.*/([^/]+)$,; qq/"$_?New mail in $1."/} @folders;
print join "\\n", @folders;
--- END printmailfolders-zsh.pl
To potential Perl hackers that read this: Golf? ;-)
HTH,
Jörg
reply other threads:[~2001-06-27 4:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010627000156.A14633@acmez.gatech.edu \
--to=gt4556a@prism.gatech.edu \
--cc=zsh-users@sunsite.dk \
/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).