home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!noc.near.net!meiko.com!mike
- From: mike@meiko.com (Mike Stok)
- Subject: Re: How to convice awk/sed users to use Perl ?
- Message-ID: <1992Sep9.163745.774@meiko.com>
- Sender: news@meiko.com
- Organization: Meiko Scientific Corp.
- References: <1992Sep9.143629.13571@cbfsb.cb.att.com>
- Date: Wed, 9 Sep 1992 16:37:45 GMT
- Lines: 46
-
- In article <1992Sep9.143629.13571@cbfsb.cb.att.com> swu@att.com writes:
- >As a Perl beginner, I don't know how to answer the following question raised
- >by my colleagues:
- > I use ksh/awk/sed very well, why bother to spend a lot of time to learn
- > Perl ?
- > What's the real advantages of perl over ksh/awk/sed ?
- >
- >I will appreciate any help.
-
- Personally speaking I like to have 1 set of regexp rules to remember
- which I can apply to arbitrary data (such as lines > 512 chars, binary
- files used by our Cobol (!) runtime) apart from maybe a file from
- emacs (or some similar program with Pascaloid notions of new lines as
- separators not terminators) with just the character 0 on the last line :-)
-
- Perl at least reads & tokenises the script before executing it and
- doesn't just say "bailing out near line 1", so usually you can be
- *fairly* happy and confident once it's started to run. The debugger's
- pretty useful sometimes too.
-
- The thing which makes lots of non-programmers like it (and loads of
- programmers struggle at first) is the way data type is context
- sensitive (e.g. Q "...so, Mike is $x a number or a string?" A "It's a
- scalar, and how it's used determines how it's interpreted" type
- conversations happen a lot around here). I like a language which has
- "until" and "unless" in it, as this makes it easier to write things
- like
-
- print $x unless $x eq "banana\n";
-
- which reads pretty sensibly to an english speaking person who spends
- more time interacting with people than machines ;-)
-
- The formatted output is pretty good for the guys who work at
- extracting data from our accounting system and combining it with adat
- extracted from a design system, then there's the ease with which I can
- fire off processes and do inter-process communication, and when I get
- stuck there are stacks of helpful people in comp.lang.perl who usually
- help out in the nicest possible way (they know who they are :-)....
-
- Mike
- --
- The "usual disclaimers" apply. | ... many were weak and confused, succumbing
- Mike Stok | to drink or drugs whenever possible ...
- mike@meiko.com |
- Meiko tel: (617) 890 7676 | Hunter S. Thompson
-