Lowry has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm seeking your wisdom. I'm looking for a way to open a file on the web without having to store it locally and use it similar to a filehandle.
E.g. something like (pseudo-code)use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get($url); my $file_content = $mech->content() while(<$file_content>){ # do something }
As far as I know mechanize dies when the file isn't an html file. Additionally, I'm not sure if I can use the string returned in a filehandle way
Please enlighten me, someone.
Lowry
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Open web address as filehandle
by Athanasius (Archbishop) on Aug 18, 2014 at 06:44 UTC | |
by Lowry (Initiate) on Aug 18, 2014 at 06:53 UTC | |
by Bloodnok (Vicar) on Aug 18, 2014 at 16:53 UTC | |
Re: Open web-adress as filehandle
by Corion (Patriarch) on Aug 18, 2014 at 06:52 UTC | |
by Lowry (Initiate) on Aug 18, 2014 at 06:57 UTC | |
Re: Open web-adress as filehandle
by LanX (Saint) on Aug 18, 2014 at 08:19 UTC | |
Re: Open web-adress as filehandle
by thomas895 (Deacon) on Aug 18, 2014 at 06:50 UTC |
Back to
Seekers of Perl Wisdom