Like this? Works fine.
#!/usr/bin/perl # http://perlmonks.org/?node_id=1188504 use strict; use warnings; my %hash = qw( title1 one title3 three title4 four title2 two ); my @labels = sort keys %hash; my @content = @hash{@labels}; use Data::Dumper; print Dumper \%hash; print "\n"; print Dumper \@labels; print "\n"; print Dumper \@content;
In reply to Re^3: Transferring hash keys to array... Need help sorting
by tybalt89
in thread Transferring hash keys to array... Need help sorting
by DARK SCIENTIST
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |