<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl

$/='@';

%dic=("gato"=&gt; "animal que mia",
      "cao" =&gt; "animal que nao mia");

while (&lt;&gt;) {
	chop;
	$_=norm($_);
	if (/(.*?)=/) { $dic{$1}=$' }
	else          { print "$dic{$_}\n"; }
	print "&gt; ";
}

sub norm {
	(my $t)=@_;	
	$t =~ s/^(\n|\s)*((.|\n)*?)(\n|\s)*$/$2/;
	$t;
}
</pre></body></html>