On 23/4/13 at 12:26, kavitahkulka...@gmail.com (kavita kulkarni) wrote:

Can you help me in finding the most time effective way to retrieve the
key-values from hash in the same sequence in which data is inserted into
the hash.

What about this? :

#!/usr/bin/perl
use strict;
my @array;
for (
  {length => 120},  # these are references
  {width => 120},
  {height => 220},
  {weight => 12},
  {price => 333},
  ) {
  push @array, $_;
}
for (@array) {
  for (keys %$_) {print "$_\n"};
}

# JD


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to