11-04-05 10:57 PM
Pascal Bourguignon wrote:
> joe@invalid.address writes:
>
>
> PERL is unreadable and unwritable. At least, with APL it was
> unreadable, but you could write it...
>
> Lisp is readable and writable.
>
> YMMV.
>
> --
> __Pascal Bourguignon__ http://www.informatimago.com/
> You're always typing.
> Well, let's see you ignore my
> sitting on your hands.
I plan to learn both perl, php, and ruby, and also lisp, scheme, guile
and python, just in time; my current self-taught computing curriculum
is for a decade. You see, I'm really impressed with awk's simplicity at
handling textual databases.
For example
Looking at this page
http://stud.wsi.edu.pl/~robert/awk/tutorial_4a.html
BEGINQUOTE
For example, if we have list of second-hand car prices like this...
ford mondeo 1990 5800
ford fiesta 1991 4575
honda accord 1991 6000
toyota tercel 1992 6500
vaxhaull astra 1990 5950
vaxhaull carlton 1991 6450
=2E..we might want to select all the cars which were made after or
during 1991 (column 3) and cost less than 6,250 pounds (column 4). We
can do this with the following awk code:
awk '$3 >=3D1991 && $4 < 6250' cars
ENDQUOTE
How would PERL and lisp deal with this same textfile containing this
same list of second-hand car prices to do the same exact query as the
above? How would other languages do it that would be best for this
purpose?
[ Post a follow-up to this message ]
|