Click here to get back home

display datestamp in HTML

 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
display datestamp in HTML Phil M 03-02-2007
Get Chitika Premium
Posted by Joe Smith on May 18, 2007, 2:13 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 Mumia W. on March 2, 2007, 2:40 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
cant display generated html in browser (perl script) March 3, 2005, 11:03 pm
Display the answer in HTML code because CGI-SCript could not hide November 17, 2007, 11:47 pm
I need to display pdf. August 8, 2007, 1:03 pm
Hash references & parsing HTML with HTML::Parser February 16, 2005, 8:10 pm
Best way to remove body/html tag from HTML::Element tree September 6, 2006, 6:38 pm
How to display a pdf file using CGI April 14, 2006, 6:00 pm
64 Bit integer display March 20, 2008, 4:04 pm
How to display 1.234.567.890,00 from 1234567890 ? May 5, 2008, 2:33 am
IE Doesn't Display Romanian Page! February 23, 2005, 11:30 pm
SYstem wait display March 28, 2005, 10:51 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap