Click here to get back home

Download MP3 file from site with cookies?

 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
Download MP3 file from site with cookies? dave_nul 07-04-2007
Posted by dave_nul on July 4, 2007, 12:40 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
Re: pb download file on internet site April 24, 2008, 11:47 am
Download A File April 2, 2008, 12:01 pm
Using perl how do you write a script to copy a remote file into your own site December 29, 2004, 6:10 am
How to download a .gif file using perl. July 31, 2006, 3:55 pm
Program that download ZIP file from web? September 4, 2006, 4:29 am
download a text file from a URL February 5, 2007, 11:24 pm
download file from Windows Webserver box using LWP November 3, 2005, 4:29 am
search Web for a file type and download them May 27, 2007, 8:16 am
Printing Hash Marks During File Download July 31, 2006, 2:01 pm
Further to: Printing Hash Marks During File Download August 5, 2006, 3:11 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap