Hi,
I have an array with 28 elements.
I copied array contents into a hash.
If i try to print the hash it is not showing all keys and values.
Code is given below,
@new;
%hash = @new;
foreach $food (keys %hash)
{
$color = $hash{$food};
print "$food is $color.\n";
}
Output is ::
attribute is Mandatory.
min is 0X00.
value is 778.
max is 9940486857.
name is Security_header.
type is nibble.
The array @new contents are,
name Protocol_discriminator attribute Mandatory value 778 min 0X00 max 994048685 value 7 min 0 max F name Security_header attribute Mandatory type nibble value 778 min 0X00 max 9940486857
I want all the contents of the array to be copied in the hash and to be printed, if i try to traverse the hash. but some how only part of the array content is copied into the hash.
Can anyone help to overcome this problem. I am struggling for the past two days.
Thanks Senthil.