#!/usr/bin/perl $num=10200; while($num++ <12000) { #if($num==10200){$num=11000;} $num =~ /.(....)/; $file= "ms$1" ; print "$file=="; @msds=(); #system "lynx -source http://www.techspray.com/$file.htm > $file.html"; open(IN,"lynx -source http://www.techspray.com/$file.htm |"); while() { push(@msds,$_); } print "\n$file ============================"; if(grep(/File Not found/,@msds)){print "file not foun\n";next;} print "printing file\n"; open(MSDS,">$file.html"); print MSDS @msds; }