I'm trying to read a text file line-by-line.
open IN, shift;
my @lines=split("\n",<IN>);
foreach my $line (@lines) {
print OUT "QQQ $line QQQ\n";
}
The problem is that it always gives me the entire file, not line by line.
What did I do wrong? Other things I've tried:
open IN, shift;
while (my $line =<IN>) {
print OUT "QQQ $line QQQ\n";
}
Ryan
