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

$/="\@\n";
use DB_File;
use Fcntl;

tie %dic, DB_File, "d.db", O_RDWR|O_CREAT, 0644, $DB_BTREE;

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

untie %dic;

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