use warnings; use strict; use LWP::Simple; print "Copy ImageCash URL here: "; my $to_get = ; chomp($to_get); my $page = get($to_get); my @images; push(@images, "http://www.imagecash.net/image.php?file=$1") while $page =~m[image.php\?file=(\d+)]g; foreach my $image (@images) { my $num = $image; $num =~ m/(\d+\.jpg)/; $num = $1; my $new_page = get($image); $new_page =~ m#src="(http://img\d+\.imagecash\.net/files666)#; getstore("$new_page/$num.jpg", "$num.jpg"); print "Stored image $num.jpg..\n"; }