X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=get;h=0ed27282bae0c9d080a921ac05130990fd77b368;hb=HEAD;hp=13a39df2bfc7fef0fe516323a233ff9fd38c576c;hpb=3487c6f92ac31ca9ce13ceba78ad63454edd7636;p=aoc.git diff --git a/get b/get index 13a39df..0ed2728 100755 --- a/get +++ b/get @@ -46,7 +46,7 @@ if ($sleep) { say "Downloading $url to $dest"; my $data = Y::AoC::UA::request($url, { body => 1 }); -Mojo::File->new($dest)->spurt($data); +Mojo::File->new($dest)->spew($data); say grey('=================================================='); print $data; say grey('=================================================='); @@ -59,5 +59,5 @@ $dest = $task.'test.txt'; my $tst = Y::AoC::UA::request($url, { cache_to => "task-$year-$day.html" }) ->find('main > article > pre > code')->first->all_text; -Mojo::File->new($dest)->spurt($tst); +Mojo::File->new($dest)->spew($tst); say "\n", grey("also downloaded $dest"), "\n";