Click here to get back home

calling perl script in apache conf

 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
calling perl script in apache conf manoj.agarwal.in 02-21-2006
Posted by manoj.agarwal.in on February 21, 2006, 4:22 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 Anno Siegel on February 21, 2006, 7:02 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
SOAP::Lite, calling apache/axis demo web service July 20, 2004, 9:35 pm
what's wrong calling a Perl/CGI script in Perl/CGI script under Tomcat server? April 8, 2007, 11:38 pm
perl script for apache mod_rewrite September 8, 2006, 11:06 am
Calling a perl script from an html doc October 18, 2004, 12:44 pm
calling a perl script from JavaScript August 3, 2005, 3:34 pm
speeding up perl script execution under apache October 29, 2004, 5:29 pm
Apache vs IIS current directory fro Perl script May 8, 2008, 3:09 am
calling External Perl Script Who calls another December 13, 2005, 12:34 pm
problem in calling program in my perl script June 20, 2006, 9:55 am
apache mod perl dbi mysql : Premature end of script headers: September 17, 2004, 3:52 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap