Can Someone please help me with this code. It's supposed to take the second field in one data base and print it in the place of field1 in the second data base and visa versa. It is supposed to simply switch the first field with the second field and print the new format to a new database.

That is the whole code, the problem is that when I run the code the output into the $german1 file is not in the format I was aiming for.

Here's what It's doing, In the File german.db the file is in this format;

aardvark|Erdferkel

The Engilsh word is on the left and the German word is on the right.

The code is supposed to switch the fields so that the German Word is in front of the English word instead. And then print the code to german1.db which is different from the file that is read Like This,

Erdferkel|aardvark

But when I run this script I open up the german1.db and it looks like this,

|aardvarkErdferkel

It's like it switches the words but it leaves out the pipe that is supposed to be between aardvark and Erdferkel and places it in front of the two fields.