#!/usr/bin/perl -w use strict; use LWP::UserAgent; my $errors = 0; my $ua = LWP::UserAgent->new; my @rows = (); foreach my $i (1..1000) { my $url = 'http://dev.media-demo.gotpantheon.com/file/' . $i; my $resp = $ua->get($url); if($resp->is_success) { my ($title) = $resp->content =~ m|]*>([^<]+)|ism; $title =~ s/^\s+|\s+$//g; if($title) { push @rows, '
  • ' . $title . '
  • '; } print STDERR "$i => found '$title'\n"; } else { $errors += 1; print STDERR "$i => no good\n"; } if($errors > 10) { last; } } if(scalar @rows) { print '
      '; print join("\n", @rows); print '
    '; }