Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: LWP HTTPS and a sore head

by BaldManTom (Friar)
on Jul 16, 2009 at 13:04 UTC ( [id://780701]=note: print w/replies, xml ) Need Help??


in reply to LWP HTTPS and a sore head

Hi anchylo, I believe you've already "downloaded" the file, you just need to give it a filename and put it somewhere. Use any filename that makes sense to you:
# Following your original code snippet my $filename = 'logfile.bz2'; open ( OF, '>', $filename ) || die "Can't open $filename locally"; print OF $response->content; close OF
Note that you may need to binmode your filehandle before writing to it if your content isn't text.

Replies are listed 'Best First'.
Re^2: LWP HTTPS and a sore head
by monarch (Priest) on Jul 16, 2009 at 14:33 UTC
    You may want to print $response->decoded_content to deal with the situation whereby the file is gzip encoded..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://780701]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-04-23 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found