in reply to Input files <>

That shebang line isn't doing anything for you (aside from enabling warnings). I doubt your installation of strawberry Perl's executable resides at /usr/bin/.

Now for the issue: Each time through the loop you are assigning the value of $input to $array[0]. I assume the last line of the file is either blank or invisible (whitespace, or non-printing control characters), which is why you're seeing no output when you print @raw. You should change @raw=$input; to push @raw, $input;. Also, no need to pre-initialize $input to '', $first to '', and @raw to (). But the real issue is your assignment to @raw inside the loop; each iteration clobbers the previous value stored in @raw and assigns a new one to the first element.

In fact, if all you're doing is printing all the lines of the file with newlines stripped and one newline at the end, you don't need to push the file into an array. Just go straight to print.

while( <> ) { chomp; print; } print "\n";

If the script worked for you under a previous version of Perl as posted, your build of that previous version of Perl was broken; demand you money back! :)


Dave