#!/usr/bin/perl open IN, "lynx -source http://www.benjaminmoore.com/msds/MSDS|"; while() { /> *([^<]*)<\/[aA]>/; $file=$1; print "==$file==\n"; system "lynx -source http://www.benjaminmoore.com/msds/MSDS/$file > files/$file"; }