my %Forward;
my %Reverse;
while (<DATA>){
/^\s*(.*?)\|(.*?)\s*$/;
$Forward{$1}=$2;
$Reverse{$2}=$1}
print "$Forward{KEY5} $Reverse{VALUE0} \n";
__DATA__
KEY0|VALUE0
KEY1|VALUE1
KEY2|VALUE2
That's what databases are for. The best way would be to store the data
in e.g. a MySQL database. If that's not feasible, maybe a couple of DBM
databases might be useful.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl