in reply to Hash not getting updated
That gives:#!/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);
If you want to learn more about hash or list, check this out,it gives solid rudimentary concept.$VAR1 = { 'white' => 'white', 'blue' => 'blue', 'yellow' => 'yellow' }; white blue yellow
|
|---|