in reply to how to read data from a URL

I just use LWP::Simple, it's pretty common option for what you need. I recommend to have a look at https://perlmaven.com/simple-way-to-fetch-many-web-pages.