my %hash = map{ my $temp = $_; $temp =~ s/a/X/g; $_, $temp } @array;