diff --git a/scrape.pl b/scrape.pl index 0a45675..82abd35 100644 --- a/scrape.pl +++ b/scrape.pl @@ -17,9 +17,8 @@ ### Get Set my $mech = WWW::Mechanize->new; -my @information; my @letters = (0, 'a' .. 'z'); -open my $OUT, ">", "full.yml"; +unlink "full.yml"; ### GO! @@ -46,10 +45,10 @@ # bailout condition undef $base_url if (!@gold && !@free && !@nearly_free); # nothing on this or subsequent pages for this loop. - - push @information, (@gold, @free, @nearly_free); + my @information = (@gold, @free, @nearly_free); + open my $OUT, ">>", "full.yml"; print $OUT Dump(@information); - + close $OUT; } }