in reply to Re: confused (and frustrated) about stdin/out
in thread confused (and frustrated) about stdin/out

We'll that's embarassing ;)

Know of a command or module that would allow me to emulate the way sort works?

-thanks
  • Comment on Re: Re: confused (and frustrated) about stdin/out

Replies are listed 'Best First'.
Re: Re: Re: confused (and frustrated) about stdin/out
by Fastolfe (Vicar) on Dec 03, 2001 at 06:35 UTC
    You mean besides sort?
    # With each line in @unsorted @sorted = sort @unsorted; # With all lines in $unsorted, maybe use IO::String my $S = new IO::String \$unsorted; @sorted = sort <$S>; # Or just split on newlines, maybe reversed too: @sorted = reverse sort split $/, $unsorted;
    Consider File::Sort for anything more complex.