[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] PPT



Date: Wed, 30 Jun 1999 10:10:00 -0400
Message-ID: <19990630101000.B9070@fermi2.chem.yale.edu>
References: <199906301200.FAA27126@cfcl.com>
X-Mailer: Mutt 0.95.6i
In-Reply-To: <199906301200.FAA27126@cfcl.com>; from fwp-digest on Wed, Jun
30, 1999 at 05:00:12AM -0700
>From vlb@cfcl.com  Wed Jun 30 07:16:58 1999

> From: "Bill Jones" <bill@fccj.org>
>
> Is there a 'strings'-equivalent function in perl?
>
> I am trying to write one, but I keep tripping
> over myself - those damn knuckles dragging
> get me every time...

tsk, tsk, you're not being lazy enough.

As Michael G Schwern already mentioned, the Perl Power Tools project at
http://language.perl.com/ppt has a strings equivalent. (Actually, it has two
now.)

For those who aren't familiar with PPT, it's an attempt to copy all of the
basic UNIX commands in Perl. Sort of like GNU, but since it's in Perl---
which is made for text processing---many of the programs are just a few
lines. Plus they're in Perl, so you can modify them or incorporate pieces of
them into your own scripts. The project has been quite successful: in about
4 months they've done almost everything, including things like mail and dc!
(see doneness.html)

Why do I mention PPT on FWP? Quoting from the "why we're doing it page":

    3.Hubris: It's listed last, but this is the most important reason --
simply
    being able to say that we did it.  Why do we climb mountains? Why do we
    learn to ski? Because it's there, and because it's fun!

(Reasons 1 & 2 are lame things like, "so people who aren't on UNIX boxes can
run diff." But we know that noone really works on non-UNIX boxes anymore.)

<plug type="shameless">For real fun, check out the games at what.html,
including wump(6) (in case you think emulating BASIC in Perl is
Fun).</plug>  Can't wait for someone to write adventure...

-Amir Karger
karger@post.harvard.edu

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org