, and run it with an unsorted text file either on stdin, or as a command line argument. The output will be sorted.defined(my $v = <>) or exit; my ($c,@c) = 1; open($_, "|-", "$^X $0") for @c[0,1]; $_ eq $v ? ++$c : print { $c[ $_ lt $v ] } $_ while <>; pop @c; print $v x $c;
In reply to Fork Sort by BenGoldberg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |