Click here to get back home

HTML::Mason

 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
HTML::Mason Terry 03-07-2005
`--> Re: HTML::Mason Eric Schwartz03-07-2005
Get Chitika Premium
Posted by Terry on March 7, 2005, 7:45 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 Eric Schwartz on March 7, 2005, 11:42 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
HTML::Mason and User site folders March 23, 2007, 7:45 pm
Struggling to install HTML::Mason (mod_perl would be a good start!) March 9, 2005, 6:31 am
HTML::Mason scripts coming up as plain text on apache server October 23, 2006, 1:46 am
MASON getting arguments. June 21, 2007, 4:05 pm
Mason book available as PDF file? October 18, 2004, 6:36 am
Mason hosting support? February 19, 2005, 12:11 pm
Perl equivalent of PHP and JSP: Mason? October 23, 2005, 4:36 pm
Anyone using Mason for standalone scripts January 15, 2008, 2:25 pm
Trying to fetch Basic Auth header in Mason April 22, 2008, 4:01 pm
Hash references & parsing HTML with HTML::Parser February 16, 2005, 8:10 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap