in reply to Scraping a website

Adding use strict;:

Global symbol "$outputfolder_html" requires explicit package name (did + you forget to declare "my $outputfolder_html"?) at dog.pl line 67. Execution of dog.pl aborted due to compilation errors.

That aside you've really over complicated this, however a quick glance at the terms of use, the site owners don't want to access their site in this manner.

Replies are listed 'Best First'.
Re^2: Scraping a website
by alialialia (Novice) on Jul 31, 2018 at 06:28 UTC

    Thank you for your help, I wasn't aware so thank you for letting me know.

      Some further comments. Use the three argument form of open:

      open(my $fh, ">", "output.txt") or die "Can't open > output.txt: $!";

      Detailed explanation.

      In general I think you've over complicated the problem. I'd avoid using curl and parsing the results with a regex. Look at Mojo::DOM, Mojo::UserAgent and Super Search for examples of both. Very powerful tools that make this sort of work trivial.