in reply to Displaying carriage returns
You've already got good answers to your question, but I wanted to point out a small inefficiency in your program.
while (<FILE>){ chomp; print "$_\n"; }
What is the point of removing the carriage return on one line, only to add another one to the end of the record on the very next line?
That's better written as:
while (<FILE>) { print; }
Or even just:
print while <FILE>;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|