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

Re: Re: At each change in...

by stefp (Vicar)
on Jun 13, 2002 at 11:41 UTC ( [id://174153]=note: print w/replies, xml ) Need Help??


in reply to Re: At each change in...
in thread At each change in...

For me, the whole point of perl is to be able to forget this Unix stuff by getting inside one hood. Perl is the (almost) the same on every platform. And the effort to learn perl is offset by being able to forget this myrad of Unix commands with myriad of options that are supported or not on a given platform. Also there is often overhead avoided by perl. In the case at hand, we have to fork and pipe (no big deal) and sort (this last can cost if the processed file is very big)

But again, TMTOWTDI.

-- stefp -- check out TeXmacs wiki

Replies are listed 'Best First'.
Re: At each change in...
by Abigail-II (Bishop) on Jun 13, 2002 at 11:55 UTC
    Is having to learn a myriad of Unix command worse than having to learn a myriad of APIs of a myriad of Perl modules? Or do you plan to do everything yourself? I rather reuse what others have done....

    Note also that IEEE Std 1003.1 - 2001 (aka POSIX) "Shell and Utilities" require the -m and -u options.

    As for the overhead of sort, in the given example, no sort is actually done. The -m option, for merge, merges files which are already presumed to be sorted - but when given one file, this passes things unsorted.

    Abigail

      It so easy to do some things in Perl that very often, I don't even think of using external commands or exotic modules so my code is independant of anything but a vanilla Perl installation. I learn Perl in 1989 for that very reason: to forget about sed, cut, sort (...) while getting the benefit to already know since perl was conceptually reaped from them.

      you don't need a sort because you assume your file(s) sorted; what a specious argument!!

      -- stefp -- check out TeXmacs wiki

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found