Click here to get back home

ANNOUNCE: Regexp::Common::time

 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
ANNOUNCE: Regexp::Common::time Eric J. Roode 12-08-2005
Get Chitika Premium
Posted by Eric J. Roode on December 8, 2005, 6:20 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
Regexp::Common OO interface October 2, 2004, 7:56 pm
Multiple substitutions with Regexp::Common? May 15, 2007, 10:45 am
Regexp::Common question related to URI query February 9, 2005, 10:16 am
GMT time to local time, according to timezone and summer/winter time. May 15, 2005, 10:45 pm
Calculating time of employee session from the log date/time stampusing perl May 24, 2005, 5:55 pm
ANNOUNCE: tclperl-3.1 October 11, 2004, 4:56 am
[ANNOUNCE] wxPerl 0.21 December 19, 2004, 5:43 pm
[ANNOUNCE] wxPerl 0.23 June 30, 2005, 8:09 pm
[ANNOUNCE] wxPerl 0.26 November 23, 2005, 9:41 pm
ANNOUNCE: WWW::YouTube June 15, 2006, 9:47 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap