in reply to Unknown File Operation
Off the top of my head, it appears to be that you would get what you want if you reduce the scope of your $data variable. The clause:
while (<FILE>) { $data1 .= $_; }
is adding to $data on each loop. So you could either:
$data = <FILE>;
...roboticus
|
|---|