in reply to variable interpolation from a filehandle

It seems you could accomplish what you want with:
$evaldata = '$linenew = "' . $lineold . '"'; eval $evaldata;
Where $lineold contais the string to be interpolated and $linenew will contain the interpolated string. Naturally, you'll have to do that for every element in the array.

Don't forget to escape all characters that can have special meanings for perl, specially if you are interpolating within html code.