in reply to Re: Re: confused (and frustrated) about stdin/out
in thread confused (and frustrated) about stdin/out
Consider File::Sort for anything more complex.# 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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: confused (and frustrated) about stdin/out
by Beatnik (Parson) on Dec 03, 2001 at 20:16 UTC |