#!/usr/local/bin/perl
use strict;
use warnings;
use Data::Dumper;

my @a = ('rev','test','neko');
my %c = ('beji'=>'bej','neko'=>'nek','rev'=>'re','test'=>'tes');
my $b = 1;
foreach my $d (@a){
  $b = {$c{$d} => $b};
}
warn Dumper $b;