##
while (<>){
split /:/;
$_[0]=sprintf("%08.3f", $_[0]);
push @data, join ":", @_;
}
####
sort{ $a <=> $b} @numbers;
####
sort{extract( $a ) <=> extract( $b )} @lines;
sub extract{
$a = shift;
split /:/, $a;
$_[0];
}
####
my %hash;
while(<>){
my ($key, $data) = split( /:/, $_, 2 );
$hash{ $key } = $data;
}
print "Sorted!:\n\n", join "|", sort {$a <=> $b} keys %hash;
####
$key .= ':001' if defined $hash{$key};
$key++ while defined $hash{$key};