Click here to get back home

problems with Time::HiRes on some SLES systems

 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
problems with Time::HiRes on some SLES systems Mark Seger 09-28-2006
Get Chitika Premium
Posted by Mark Seger on September 28, 2006, 1:08 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

Posted by Mark Seger on September 28, 2006, 8:26 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
accuracy of Time::HiRes June 27, 2008, 4:38 pm
Time::HiRes hell... July 1, 2008, 12:36 pm
Time::HiRes < 1.91 and glibc 2.4 incompatibility April 12, 2008, 8:46 am
Time::HiRes module and timing a command... November 16, 2004, 10:54 am
Time::HiRes usleep on windows strange behaviour...please please help!! November 29, 2005, 11:37 pm
Converting between Local and Unix time problems January 5, 2006, 1:20 pm
GMT time to local time, according to timezone and summer/winter time. May 15, 2005, 10:45 pm
Workflow Systems August 16, 2006, 10:02 am
Secure Database Systems July 9, 2004, 3:41 am
Information about file systems. November 1, 2006, 3:59 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap