[OT] - subthread - perl vs sed Re: [olug] Text search and Replace

Christopher Cashell topher at zyp.org
Tue Nov 25 21:49:39 UTC 2003


At Tue, 25 Nov 03, Unidentified Flying Banana Terry, said:
> Interesting:

Yes, very interesting.

> [rockstar at theshow local]$ ls -l /usr/bin/perl
> -rwxr-xr-x    2 root     root        12800 Oct 15
> 10:17 /usr/bin/perl
> [rockstar at theshow local]$ ls -l /bin/sed
> -rwxr-xr-x    1 root     root        87260 Oct 25
> 00:12 /bin/sed

Hrm. . . I wonder if that /usr/bin/perl binary is some sort of wrapper
program, or something, possibly calling the real Perl binary to do the
work (might be something to aid with dependencies).  That's the only way
I can think of that the perl binary could be that small.

I got results[1] closer to what was posted earlier, with Perl being
*much* larger than sed, and that goes along with my experience, as well.
Perl is known for being very powerful, but it hasn't been a lightweight
interpreter for a *long* time (As even the developers will tell you (and
is one of the many reasons for Perl6/Parrot's development)).

Perl is a great tool, as are sed and awk.  They each have their place
and strengths. ;-)


 [1] Debian/Unstable:
     -rwxr-xr-x    2 root     root      1126956 Oct 24 08:03 /usr/bin/perl
     -rwxr-xr-x    1 root     root        36280 Oct 26 19:54 /bin/sed
     -rwxr-xr-x    1 root     root       254668 Sep  8 19:19 /usr/bin/gawk
     -rwxr-xr-x    1 root     root        86616 May 30 09:27 /usr/bin/mawk
     For comparison purposes, I also included two of the most common awk
     clones.  Perl is v5.8.1, sed is GNU sed 4.0.7.  Results of a check
     of NetBSD showed almost identical results to the FreeBSD ones
     posted earlier.

-- 
| Christopher
+------------------------------------------------+
| A: No.                                         |
| Q: Should I include quotations after my reply? |
+------------------------------------------------+



More information about the OLUG mailing list