Click here to get back home

Changing remote_addr on incoming request

 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
Changing remote_addr on incoming request tito 09-14-2005
Posted by tito on September 14, 2005, 2:04 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
redirect incoming data to port 21 with perl September 5, 2004, 11:16 pm
How do I detect if I have incoming data in when I pipe somethingto my perl script ? August 5, 2004, 2:45 pm
perl doc url changing September 1, 2005, 2:52 am
$ftp->??? for changing local directory January 6, 2006, 8:31 am
changing .cpan location March 31, 2006, 1:27 pm
Changing the inherited STDOUT May 30, 2006, 7:24 am
Changing one array affects the other March 27, 2007, 3:09 am
Optionally changing file perms? September 23, 2004, 2:30 pm
Math::NumberCruncher changing scalar into... something else November 15, 2005, 11:57 am
Changing seperator in large CSV files? January 18, 2006, 12:42 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap