in reply to Re: sorting arrays...
in thread sorting arrays...

$ perl -e 'system q !sort -k 2 -t "|" -o file file!'

That works well on Unix, but not on Windows (at least not without cygwin). The fellow who posed the question is on Windows.

Replies are listed 'Best First'.
Re: sorting arrays...
by Abigail-II (Bishop) on Jul 13, 2003 at 00:24 UTC
    Or some other toolkit that has sort. I don't understand why this is a problem. perl doesn't come standard with Windows either. And we never have a problem with Perl programs using modules that don't come standard with Perl. So, why always this whining "it doesn't work on Windows", when using a well known tool that has been ported to Windows eons ago?

    Software reuse is good, even if it isn't written in Perl.

    Abigail

Re: Re: Re: sorting arrays...
by demerphq (Chancellor) on Jul 13, 2003 at 01:25 UTC

    Er, actually Win2k (and not doubt NT also, I havent checked) does have sort provided. No cygwin required. I imagine some switch changes are required however.

    Although if by "Windows" you mean Win9x then of course it isn't provided. But then again nor is it provided on Playstation 2. Point being why should a game machine need to sort?


    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

    • Update:  
    While Win2k does have a sort command built in its no where near as powerful as the cygwin/*nix tool that Abigail-II mentions. So I agree that as far as NT goes, unless installing cygwin is an option his proposed solution is not real useful :-)