Click here to get back home

Perl robot uploading to ASP Web page

 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
Perl robot uploading to ASP Web page Lyall 09-08-2005
Posted by Lyall on September 8, 2005, 7:49 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 Lyall on September 8, 2005, 10:50 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
Online banking robot (automate the logon with LWP) July 4, 2007, 5:33 pm
ASP.Net, PERL and File Uploading July 22, 2006, 8:19 pm
Perl on TRIPOD hosted sites..file uploading question.. April 5, 2005, 2:09 pm
Simple (!) HTML/PERL code fpr uploading files through web pages entyr field ?? November 18, 2004, 11:12 pm
LWP user agent grabs the intermediate wait page after POST intead of the actual result page February 12, 2008, 12:50 am
maybe OT: uploading files w/ cgi July 21, 2004, 11:46 am
vb.net cgi uploading files November 8, 2005, 8:18 am
Uploading 2 files with 1 CGI buffer January 9, 2006, 3:42 pm
Discarding unwanted filetypes when uploading October 25, 2005, 10:23 pm
PerlEx uploading a text file December 25, 2007, 2:32 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap