[Israel.pm] Perl for C, C++, C#, Java, COBOL and VB programme rs
gaal at forum2.org
Wed Mar 10 13:49:12 PST 2004
I'm firmly in the "Use what works best for you, and keep your eyes
open for new tools" camp, and I mostly agree with Yuval here. A coupla
On Wed, Mar 10, 2004 at 10:41:48PM +0200, Yuval Kogman wrote:
> I beg to differ - i use grep end egrep all the time, for weeding files.
Apart from being easier to type, grep (the gnu version, at least) is
insanely fast. This is noticeable on large files. Plus, if you know your
tools well, you can do nifty things, such as show up lines leading up to
grep -B2 moose file
Of *course* you can do this in Perl, but not as idiomatically.
It's great to have your swiss army knife, but sometimes all you need is
Then again: sometimes you're on different platforms. Perl code is fairly
portable (on unix, it is quite portable). If you have the dubious pleasure
of working on the unmodern unices, for example. chances are you won't have
gnu tools and your grep will be missing "-B"efore and "-A"fter on HP-UX or
AIX. In those cases it's great to have Perl, even some old perl5.003_02.
> The number of times I write 'cat' in one day is remarkable in contrast
> to it's out-of-the-box usefulness.
(Vying for a Useless Use of Cat award, are we? :)
Gaal Yahas <gaal at forum2.org>
More information about the Perl