http://qs321.pair.com?node_id=674784


in reply to Why are lines being skipped in output?

Change:
while (<test>) { $_ =~ <test>; chomp; s/(th)/TH/gi; print "$_\n"; }
To:
while (<test>) { s/th/TH/gi; print; }
and it should work.

Replies are listed 'Best First'.
Re^2: Why are lines being skipped in output?
by negzero7 (Sexton) on Mar 18, 2008 at 13:50 UTC

    Fantastic! Thanks for the help everyone, I didn't realize it would read two separate lines like that, but now it makes sense.