The required test can be easily achieved by using Test::WWW::Mechanize with Test::More, where it accesses the URL and it Checks for the response codes being returned.
Example Code looks like:
use Test::More tests => 1;
use Test::WWW::Mechanize
$mech->Test::WWW::Mechanize->new;
$mech=get_ok(URL);
The response it return will be as follows:
ok - Got <<URL>> ok