Click here to get back home

Auth DBI on apache

 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
Auth DBI on apache joe 06-05-2007
`--> Re: Auth DBI on apache Gunnar Hjalmars...06-05-2007
Posted by joe on June 5, 2007, 8:53 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 Gunnar Hjalmarsson on June 5, 2007, 9:13 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
help with auth dbi May 13, 2008, 4:50 pm
Auth Surfing using Perl March 21, 2005, 3:23 pm
http auth logindialog box May 30, 2005, 9:40 am
htaccess auth question January 13, 2006, 2:17 pm
MIME::Lite and smtp auth June 28, 2007, 4:13 am
Trying to fetch Basic Auth header in Mason April 22, 2008, 4:01 pm
starting apache with mod_perl, error on Apache.pm July 21, 2004, 5:26 pm
Apache::Status March 3, 2005, 1:14 pm
apache::template July 23, 2005, 12:38 am
apache logs October 22, 2005, 10:17 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap