in reply to Cannot print line

Your code has a problem.
my $file = <IN>

reads in the first line of the file. You can just

print $file;

and be done. Instead, you split the line on newlines (there can't be more than one) and assign the result to an array. And, you repeat this for each line of the file (that's why you get the whole file on the output). I'm not able to get the uninitialized warning.

Update: The warning means the line was empty, therefore there was nothing to split it into.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ