Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- like File::Fetch but not to filesystem?
- Peter Billam
November 28, 2009, 12:05 am
rate this thread
Greetings. I'd like to fetch a file designated by a URL, loading
it straight into a string of bytes rather than having to create
temporary files. File::Fetch offers a
fetch( [to => /my/output/dir/] )
method, which seems to mandate going to the filesystem. Is there
something similar which returns a scalar, or a filehandle that I
can read from ?
Peter Billam www.pjb.com.au www.pjb.com.au/comp/contact.html
- Randal L. Schwartz
November 28, 2009, 1:19 am
Re: like File::Fetch but not to filesystem?
Peter> Greetings. I'd like to fetch a file designated by a URL, loading
Peter> it straight into a string of bytes rather than having to create
Peter> temporary files.
my $bytes = get "http://example.com/some/url/here ";
No temp file required.
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
- » XML::RSS Install Fails on Mac OS X 10.6 (Perl 5.10)
- — Previous thread in » PERL Modules Announcements