my @content = get("$url$cnt"); while my $beaver (split/href/,@content) { if ($beaver =~ m#/files/images/thumb/ ([a-zA-Z0-9]+\.jpg)#gx) { push(@images, "http://www.imagebeaver.com/files/images/$1:$1"); } }