in reply to Hash not getting updated

Hi,

Is this what you want?
#!/usr/bin/perl -w use strict; use Data::Dumper; my @array = ("white","blue","yellow"); my %hash = (); foreach my $temp (@array) { $hash{$temp} = $temp; } print Dumper \%hash; print join (" ",keys %hash);
That gives:
$VAR1 = { 'white' => 'white', 'blue' => 'blue', 'yellow' => 'yellow' }; white blue yellow
If you want to learn more about hash or list, check this out,it gives solid rudimentary concept.
When I first learn Perl, I also found this information about constructing data structure in Perl very useful.

Regards,
Edward