I have been trying to create a program using perl www::Mechanize that will follow all of the links on a webpage and then check each one of them to see if any of them return a 401 response (using mech->status and so on)
If anyone could show me a perl www::Mechanize program to do it that would be great.
I have tried a number of ways of doing it but cant seem to get it to work correctly.
I am fairly experienced with perl www::Mechanize and have done much more complex things with it but just can’t get it to follow each of the links in the foreach loop and see if they give a 401 response header.
Your help is much appreciated, thanks CM
You need to use == instead of = to check if one number equals to another in Perl!