I have no problem like you describe:

C:\temp>perl -MLWP::Simple -e "getstore 'http://ichart.finance.yahoo.c +om/table.csv?s=AMZN&d=8&e=30&f=2004&g=d&a=4&b=16&c=1997&ignore=.csv', +'test.tmp'" C:\temp>dir test.tmp Datenträger in Laufwerk C: hat keine Bezeichnung. Datenträgernummer: 6C76-F753 Verzeichnis von C:\temp 30.09.2004 17:59 88.703 test.tmp 1 Datei(en) 88.703 Bytes 0 Verzeichnis(se), 65.836.314.624 Bytes frei C:\temp>perl -ple "exit if $.>5" test.tmp Date,Open,High,Low,Close,Volume,Adj. Close* 29-Sep-04,39.45,40.92,39.36,40.84,9918800,40.84 28-Sep-04,40.15,40.33,38.97,39.43,11902900,39.43 27-Sep-04,40.91,41.01,39.75,39.93,8397400,39.93 24-Sep-04,41.81,41.91,40.85,40.94,6205700,40.94 C:\temp>

I also don't have the problem you describe using WWW::Mechanize:

C:\temp>type mech.pl use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $tempfile="tmp.txt"; $mech->agent_alias( 'Windows IE 6' ); $url="http://ichart.finance.yahoo.com/table.csv?s=AMZN&d=8&e=30&f=2004 +&g=d&a=4&b=16&c=1997&ignore=.csv"; my $res = $mech->get( $url,":content_file"=>$tempfile ); warn $mech->status; C:\temp>perl -w mech.pl 200 at mech.pl line 7. C:\temp>perl -ple "exit if $.>5" tmp.txt Date,Open,High,Low,Close,Volume,Adj. Close* 29-Sep-04,39.45,40.92,39.36,40.84,9918800,40.84 28-Sep-04,40.15,40.33,38.97,39.43,11902900,39.43 27-Sep-04,40.91,41.01,39.75,39.93,8397400,39.93 24-Sep-04,41.81,41.91,40.85,40.94,6205700,40.94

So the problem must be somewhere else, like maybe you haven't shown us the actual code you are using, or you are not allowed to write into the current directory or some other problem... You should check what the actual result code is you get from WWW::Mechanize, maybe it is also a network problem.


In reply to Re: Saving contents of a Target Link. by Corion
in thread Saving contents of a Target Link. by MiniMe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.