Click here to get back home

Ciscotutorials.info is your gateway to the best

 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
Ciscotutorials.info is your gateway to the best ciscotutorials2 10-10-2007
Get Chitika Premium
Posted by ciscotutorials2 on October 10, 2007, 4:02 am
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
Selecting Default Gateway April 18, 2008, 1:45 pm
Secure VPN Gateway - a Perl solution January 2, 2007, 7:31 pm
http://search.cpan.org/ getting 502 Bad Gateway error September 18, 2005, 1:50 pm
AWLP turns your PC into web-managed wireless access gateway January 4, 2005, 3:51 am
www.hetong168.com Chinese biggest contract website first A2A gateway October 17, 2005, 11:02 pm
Need info March 9, 2006, 8:57 am
getting font info? September 8, 2005, 7:25 pm
DBI call info January 24, 2007, 10:10 pm
file info on XP August 10, 2007, 3:26 pm
how to retrieve info February 21, 2008, 2:09 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap