Question : Perl map - need to map a array into a hash as arrayelement->array_index
- by TGV
Hi folks.
I have a array like this:
my @arr = ("Field3","Field1","Field2","Field5","Field4");
Now i use map like below , where /DOSOMETHING/ is the answer am seeking.
my %hash = map {$_ => **/DOSOMETHING/** } @arr
Now I require the hash to look like below:
Field3 = 0
Field1 = 1
Field2 = 2
Field5 = 3
Field4 = 4
Any help?