Creating unique mapping from multiple mapping

Hello,
I do not know if this is the right title to use. I have a large dictionary database which has the following structure:

where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =.
What I am looking for is a perl script which will take each line of such as data structure and reduce it such that the first word in English maps to the first word in the Target Language and so on till all the mappings are over to arrive at the following database:

The database is in Unicode.
At present I am using macros to do the job but the macros are terribly slow. I am still a novice in perl and my knowledge of awk does not seem sufficient to handle this type of database.
Could someone please help out with a script in Perl or Awk. The database is huge and runs to over 500,000 lines.
Many thanks in advance

It would be better if you posted the sample data in real format ie:

a b c d e=p q r s t

And what should be the desired output?

a=p
b=q
c=r
d=s
e=t

?

I am posting around 6 lines of the database.
Langauge1 (to the left of the delimiter is English (need I say that ?), Language2 is Hindi.

The desired output which my macro spewed out is:

I hope the sample is readable.
Here the sample comprises a grid of 3 to 3. But in some cases the names can be as many as five to a side.
Many thanks for your interest

Try:

awk -F"=" '{n=split($1,a," ");split($2,b," ");for (i=1;i<=n;i++) print a"="b}' file
1 Like

Many thanks. The script worked beautifully. I coupled it with an awk script for frequencies and I can now see the output in frequencies and find out which name glosses are more frequent and which are less.
Tested it on around 200 thousand lines and it did the job in around 22 secs. (Had set a timein timeout function.)

In perl..

$ perl -F'=|\s' -lane '$a=($#F+1)/2;while($i<$a){print "$F[$i]=$F[$i+$a]";$i++}' infile