Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Why are lines being skipped in output?

by lidden (Curate)
on Mar 18, 2008 at 13:43 UTC ( #674784=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://674784]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-11-29 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?