- or download this
while (<TEST>) {
my ($key,@fileData) = split /\|/;
...
my ($key,@fileData) = split /\|/;
$test{$key} = \@fileData;
}
- or download this
foreach my $key (keys %test) {
push (@sorted, "$key|$test{$key}->[0]|$test{$key}->[1]|$test{$ke
+y}->[2]|$test{$key}->[3]");
...
foreach my $key (keys %test) {
push @sorted, (join '|', ($key,@{$test{$key}});
}
- or download this
open(TEST, ">test.txt") || die "File couldn't be opened for writing: $
+!";
foreach my $key (sort keys %test) {
...
print TEST "\n";
}
close(TEST);
- or download this
foreach my $key (sort keys %test) {
#to
foreach my $key (sort { $test{$a}[-1] <=> $test{$b}[-1] } keys %test)
+{