Hmm, don't really understand what you are doing there, but:
while (<INFO>)
{
$line=<INFO>;
}
close INFO;
my @new2;
if($var{param}) { list_param($var{param}); }
if($var{the}) { list_the($var{the}); }
You read in the whole file, and do nothing, but overwrite your $line. After theat you call yout sub's with the $line, which now contains only the last line of your inputfile.
Maybe you should try to put the sub-calls into the while loop!?
And if you want to replace everytime the same, than this maybe will work to:
perl -p -e 's/yourstring/yournewstring/g' inputfile > outputfile
But that might not that flexible as you need...
-----------------------------------
--the good, the bad and the physi--
-----------------------------------