Please, I’m initializing 2 hashes by:
$hash1{$key} = -9;
$hash2{$key} = -9;
Then I get the array @order with the order of the keys:
my @order1 = sort {$a cmp $b} keys(%hash1);
my @order2 = sort {$a cmp $b} keys(%hash2);
Then I want to print these 2 arrays intercalating the keys. Example: 1º key of 1º hash, 1º key of 2º hash, and so on.
print(join("\t", @order1, @order2) . "\n"); #this will print the entire hash1 first and then the hash 2
Please how can I do it?
1 Answer