in reply to eliminate quotes

$line =~ tr/"//d;

By default, tr, like m and s, acts on $_. It also has defaulting rules for the right side that prevent actually deleting characters unless you specify the /d modifier.

Also, you are both reading the whole file into an array of lines and reading through it with a while loop. Do one or the other, not both. The way it is, you read the first line (into $_), then read the remaining lines into the array that you then loop over. Because you've reached the end of the file, the second time your while condition is tested, it is false.

Update: added /d