Click here to get back home

Framework help: Can HTML::Template do this? If not, what CPAN module can?

 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
Framework help: Can HTML::Template do this? If not, what CPAN module can? bill.raty@gmail.com 09-08-2005
Posted by bill.raty@gmail.com on September 8, 2005, 1:02 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 Leigh Sharpe on September 9, 2005, 3:58 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
HTML::template Module in perl April 6, 2007, 7:26 am
HTML::Template module in perl April 9, 2007, 4:29 am
HTML::Template October 24, 2007, 12:50 am
Dreamweaver (or some such) and HTML::Template? March 7, 2005, 9:38 am
Converting my index.pl(cgi) to html::template one April 26, 2005, 7:03 pm
perl html template error March 11, 2008, 10:24 am
modperl: HTML::Template not working inside handler February 25, 2008, 2:33 pm
Problem installing module Template March 3, 2006, 7:19 am
why /usr/bin/cpan can't find HTML::Mail ? July 3, 2007, 7:22 am
converting games.pl(cgi.pm) => games.pl (html::template) April 28, 2005, 12:31 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap