in reply to Re: Scraping a website
in thread Scraping a website

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

Replies are listed 'Best First'.
Re^3: Scraping a website
by marto (Cardinal) on Jul 31, 2018 at 07:44 UTC

    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.