Click here to get back home

perldebtut - Perl debugging tutorial

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
perldebtut - Perl debugging tutorial elsiddik 11-26-2007
Get Chitika Premium
Posted by elsiddik on November 26, 2007, 1:59 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Perl debugging September 29, 2005, 9:20 am
Review of "Pro Perl Debugging" August 11, 2005, 2:56 pm
debugging perl program with Tk mainloop March 13, 2006, 5:21 am
how to skip to a certain loop with debugging option perl -d January 17, 2005, 10:23 pm
Debugging Memory consumption for Perl Program June 29, 2006, 3:41 am
perl tutorial January 9, 2005, 11:35 pm
Perl Threads Tutorial September 18, 2005, 12:22 pm
PERL TK Online tutorial May 30, 2006, 12:16 am
Perl Tutorial With Exercises May 12, 2007, 12:45 pm
Perl -> My SQL - Tutorial or Guide? November 10, 2008, 2:31 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap