Click here to get back home

Re: Passing username and password using LWP::UserAgent

 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
Re: Passing username and password using LWP::UserAgent Michele Dondi 12-12-2006
Get Chitika Premium
Posted by Michele Dondi on December 12, 2006, 1:49 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
Re: Passing username and password using LWP::UserAgent December 12, 2006, 8:59 am
Net::SMTP with username & password November 22, 2005, 9:11 pm
read a webpage with username/password June 12, 2006, 12:04 pm
how to use Perl to input username and password for website? August 14, 2005, 8:20 pm
start firefox or mozilla with username and password September 26, 2005, 9:26 pm
How to interactively sending the username/password to login using ssh October 25, 2007, 7:11 pm
POSTing username and password to web server with cookie enabled August 20, 2005, 4:12 am
Avoiding username/password prompt when using Win32::OLE to open doc August 26, 2005, 1:15 pm
using perl to submit username/password and access subsequent pages February 9, 2005, 5:13 am
How can I use the password and username stored in cookie files to access the web automatically January 5, 2007, 3:49 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap