my $whatever; my @sortedarray; open(SORTED, ">sorted.txt"); open(TOSORT, "tosort.txt"); my %hash; while ($whatever = <TOSORT>) { chomp $whatever; my($name,$number) = split(/\|/, $whatever); $hash{$name} = $number; } foreach my $name (sort keys %hash){ my $number = $hash{$name}; print "$name\|$number"; } close(TOSORT); close(SORTED);
In reply to Re: sorting arrays...
by artist
in thread sorting arrays...
by iamrobj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |