Hi monks i want to print hash keys and values without changing the order what can i do for that for example
#!/usr/bin/perl #hash2.plx use warnings; use strict; my %where=( Gary => "Dallas", Lucy => "Exeter", Ian => "Reading", Samantha => "Oregon" ); for (keys %where) { print "$_ lives in $where{$_}\n"; } _OUTPUT_ Samantha lives in Oregon Gary lives in Dallas Lucy lives in Exeter Ian lives in Reading _EXPECTED OUTPUT_ Gary lives in Dallas Lucy lives in Exeter Ian lives in Reading Samantha lives in Oregon
that means i want to print the keys and values without changing the order
In reply to Hash error by satzbu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |