Click here to get back home

SENIOR SOFTWARE ENGINEER Internal Web Systems and Tools

 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
SENIOR SOFTWARE ENGINEER Internal Web Systems and Tools Krish 02-02-2006
Posted by Krish on February 2, 2006, 2:30 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

Posted by David H. Adler on February 2, 2006, 3:58 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
HCL Technologies:Software Engineer/Senior software Engineer ..:: JobMaguz Update ::.. October 8, 2007, 2:29 pm
2nd CFP: DATICS 2008 - Design, Analysis and Tools for Integrated Circuits and Systems March 8, 2008, 5:14 pm
[ANNOUNCE] Software tools for Perl (coverage, profiling, flow tracing) April 6, 2006, 9:04 am
URGENT: SENIOR SAP PP/MM ANALYST - San Jose, CA May 14, 2008, 4:51 pm
Senior Perl developer position in Montreal, Canada June 1, 2007, 10:32 am
Hi friends see my webpage and open the weblinks in that page it consists of 1.latest antivirussoftware 2.library softwares 3.software projects 4.software cracks 5.download accelerator plus 6.mobile themes 7.mobile softwares(for nokia,samsung,son July 17, 2007, 12:50 pm
IMPORTANT WEBSITES ARE FOUND OPEN ALL WEBSITES AND MAKE MORE USE OF IT....... 1.latest antivirussoftware 2.library softwares 3.software projects 4.software cracks 5.download accelerator plus 6.mobile themes 7.mobile softwares(for nokia,samsung,son July 19, 2007, 1:50 pm
updating tools July 10, 2005, 11:20 am
Diff Tools October 17, 2005, 11:11 pm
Visualising / overview tools March 28, 2008, 11:29 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap