RULES a =b=>$_ = "$marc$_@; $marc$==> $marc($word)\b==>$dict{$1}$marc!! defined($dict{$1}) $marc($word)\b=e=> ucfirst($dict{lc($1)}).$marc !! defined($dict{lc($1)}) $marc($word)\b==>($1)$marc!! !defined($tt{$1}) $marc(.)==>$1$marc RULES b de o\b==>do ENDRULES %dict=(driver=>"motorista", the=>"o", of=>"de", car=>"carro"); $word='\w+'; $marc='___'; if(b(a("I see the Driver of the car")) eq "(I) (see) o Motorista do carro") {print "ok\n"} else {print "ko\n"}