Hi to all,
How do i print the hashes in the stored manner.because when i print the hash value it print random order by default. But i want the value by the stored
manner.
Here i am using this hash
[CODE=perl]my %status=('Payme nt Received'=>PR,' Order Under processing'=>'U nder processing','Sh ipped From WareHouse'=>SWH ,Courier=>C,Del ivered=>D);
or $key(keys %status)
{
print "$key \t $status{$key}";
print "\n";
}
[/CODE]
The output will be
Delivered D
Order Under processing Under processing
Payment Received PR
Courier C
Shipped From WareHouse SWH
But I want
Payment Received PR
Order Under processing Under processing
Shipped From WareHouse SWH
Courier C
Delivered D
Thanks
Regards
Rajiv
How do i print the hashes in the stored manner.because when i print the hash value it print random order by default. But i want the value by the stored
manner.
Here i am using this hash
[CODE=perl]my %status=('Payme nt Received'=>PR,' Order Under processing'=>'U nder processing','Sh ipped From WareHouse'=>SWH ,Courier=>C,Del ivered=>D);
or $key(keys %status)
{
print "$key \t $status{$key}";
print "\n";
}
[/CODE]
The output will be
Delivered D
Order Under processing Under processing
Payment Received PR
Courier C
Shipped From WareHouse SWH
But I want
Payment Received PR
Order Under processing Under processing
Shipped From WareHouse SWH
Courier C
Delivered D
Thanks
Regards
Rajiv
Comment