Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wanted: one-liners

1 view
Skip to first unread message

Joseph N. Hall

unread,
Nov 9, 1996, 3:00:00 AM11/9/96
to

I'm collecting Perl one-liners for inclusion in a project I'm
working on.

If you have written, or observed, an extremely cool line of Perl,
I'd appreciate you sending me:

1) the line of Perl
2) who wrote it
3) where it first appeared, if known

By "extremely cool" I mean something on the order of a decent JAPH,
although I'm not collecting JAPHs. It can be a line of Perl or a
Perl command line. It's okay if it's oblique, "bent," or
hard to understand, but it should not be deliberately obfuscated.
It should be efficient. It should be instructive in some way.
It does NOT have to be general-purpose.

Submit as many as you like.

Proper credit and thanks WILL be given. More details on where
this is headed later.

(Apologies in advance for the anti-spam mailbot. It won't bother
you if you have a Newsgroups: line in your email to me.)

-joseph

--
76% of all CGI questions posted in comp.lang.perl.misc are answered by:
"CGI.pm. LWP. http://www.perl.com/CPAN/modules/01modules.index.html."
....
Joseph N. Hall http://www.5sigma.com/joseph/ jos...@5sigma.com
Proprietor, 5 Sigma Productions P.O. Box 6250 Chandler AZ 85246
Perl instruction (http://www.5sigma.com/perl/), C++/C/Perl software,
web stuff, original music >>>Perl questions? mailto:pe...@5sigma.com

Phil Abercrombie

unread,
Nov 11, 1996, 3:00:00 AM11/11/96
to jos...@5sigma.com


1. This is my "which" script which finds multiple files in the path
and allows wildcarding... (circa 1994)

#!/usr/bin/perl -l012
$"=',';($p=$ENV{PATH})=~tr/:/,/;map-d||-x&&print,glob"{$p}/{@ARGV}";


2. This is the bent thing i invented for doing "min($a,$b)" (circa aug 1996)

[ $a => $b ] -> [ $b <= $a ]


0 new messages