in reply to I don't understand why keys %hash does this ...
#!/usr/bin/perl use strict; use Data::Dumper; my %HoTypes = my @HoTypes = ( 'PythonQuestions' => [ '[PythonQuestions|Python Questions]', 318, +3, 10 ], 'OffTopics' => [ '[OffTopics|Off Topic Post]', 500, +3, 10 ], 'notes' => [ 'Notes', 283, +3, 20 ] ); # retrieve the keys in the original order @HoTypes = @HoTypes[map { $_ % 2 ? () : $_ } 0..$#HoTypes]; # and use the keys recorded in the array for my $T ( @HoTypes ) { my $nodeStr = $HoTypes{$T}[0]; print "$T -> $nodeStr\n"; }
|
|---|