...
} # end while
seek(D, 0,0); # add this to rewind <D> before reusing it.
foreach (<D>) {
...
Maybe rethink if you need a while loop first and a foreach loop next?
What do you expect the sort to do actually?
Update:
The solution to get the ... splitted in the second print line is simply to use split there too:
print F00 +(split)[0,1,5], $/;
print FOO (sort { $a <=> $b } +(split /\s+/, $_)[0,1,5] );
Cheers, Sören
In reply to Re: sort using <=>
by Happy-the-monk
in thread sort using <=>
by drock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |