Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: perl

by extremely (Priest)
on Nov 10, 2000 at 05:18 UTC ( [id://40874]=note: print w/replies, xml ) Need Help??


in reply to perl

On most modern systems this may suffice as well.
grep -vc '[^[:space:]]' filenames...

Of course it isn't perl but it is sexy =) Tho to be honest I really use a space and ^Vtab rather than that crappy ansi notation =).

Someone needs to snag the most recent regexp engine from perl and make a real greperl or grep with a -P flag to use that engine. Too many good tweaks in the perl regexp are going unexercised. =)

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
(tye)RE: perl
by tye (Sage) on Nov 10, 2000 at 06:06 UTC
      There is all kinds of hard in the world:
      root# ls -l `which perl`
      -rwxr-xr-x    3 root     root       733687 Apr 15  2000 /usr/bin/perl
      root# ls -l `which grep`
      -rwxr-xr-x    1 root     root        75600 Feb  3  2000 /bin/grep

      One of them is footprint. I love perl, but it's a big stick to hit grep with. =)

      --
      $you = new YOU;
      honk() if $you->love(perl)

        I don't think you realize what it takes to make the Perl regex engine work. You can't just rip it out of Perl. To make it work you'd probably end up just embedding perl into an executable, which would require even more footprint.

        Besides, every good system should have Perl so the footprint you should be comparing is grep.pl vs. grep.exe (to borrow a file naming convention from a different platform). I think the pendulum will swing the other way. :)

        Update: The two grep's weigh in a 16K and 820 bytes (smaller than grep.exe or much, much smaller).

                - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://40874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 02:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found