[Chicago-talk] Downloading a file via WWW::Mechanize

Jay Strauss me at heyjay.com
Sat Oct 2 08:23:29 CDT 2004

Jay Strauss wrote:

> Leland Johnson wrote:
>> perldoc WWW::Mechanize | grep -A 10 -B 10 "file"
>> I can't seem to get `grep -C 10 "tofind" to work in osx. Any 
>> sugguestions?
>> On Sat, 02 Oct 2004 00:02:02 -0500, Jay Strauss <me at heyjay.com> wrote:
>>>> I just don't see how to do it in my instance, I can't use $mech->get
>>>> because its not a uri, its a form I need to fill out, then push the
>>>> download button, after which I download a form.
> Leland, thanks for the response.  But, for me it's not a question of 
> not reading the docs (as Andy assumes).  From the docs I don't see how 
> to do what I want.
> The docs lead me to believe:
> $mech->get( $url, ":content_file"=>$tempfile );
> Requires a URL to follow.  In my case I don't have that.  I have a 
> form that needs filling and a submit button.
> Thanks
> Jay
PS  I've already tried:


use WWW::Mechanize;
my $url = "http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx";

my $mech = WWW::Mechanize->new();
$mech->get( $url );


$mech->get( $url, ":content_file"=>'dummy');

More information about the Chicago-talk mailing list