use strict; use LWP::Simple; use HTML::LinkExtor; my $url = 'http://www.example.com/index.html'; my $file = 'index.html'; getstore($url, $file); my $p = HTML::LinkExtor->new; $p->parse_file($file); my $i = '000'; while ($p->links) { next unless $_->[0] = 'img'; shift @$_; my %attrs = @$_; getstore($attrs{src}, "img$i"; ++$i; }