I had an issue in my code,that's why i had asked this question and given a small example which was very close to
the issue i was facing.And your reply helped me to solve the issue.
i feel instead of
@hash{ @array } = @array;
$hash{@array} = @array ;
would be better
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper 'Dumper';
my @colors = qw( white yellow green );
my %hash;
$hash{ @colors } = @colors;
print Dumper \%hash;
__END__