Just for fun, I’m writing a Perl program to check if a given website exists. For my purposes, a website exists if I can go into my browser, punch in the url and get a meaningful webpage (meaning not an error or “failed to open page” message). What would be the best way to go about doing this? Eventually I would like to be able to give my program a list of hundreds of urls.
I’m thinking about just pinging each of the urls on my list to see if they exist; however, I don’t really know too much about networking so is this the best way to do it?
Using Library for WWW in Perl (LWP):