while ($count<=21151){ #create output file if ($append<1) { open(MYOUTFILE, ">newtest2.out"); #open for write, overwrite } else { open(MYOUTFILE, ">>newtest2.out"); #open for write, append } print MYOUTFILE "\n"; #write newline #url is my page $url2[$c2] = "http://www.mysite.com/index.cfm?fuseaction.showme&user=$count"; #get the data $data2[$c2] = get($url2[$c2]) or die $!; #parse var with data $p2[$c2] = HTML::TokeParser->new(#$data2[$c2]); #get title information from main table while ($token2[$c2] = $p2[$c2]->get_tag("table")) { next unless defined($token2[$c2]->[1]{width}); next unless $token2[$c2]->[1]{width} == "435"; $p2[$c2]->get_tag("td"); $p2[$c2]->get_tag("span");$p2[$c2]->get_tag("span");$p2[$c2]->get_tag("\span"); $title2[$c2] = $p2[$c2]->get_trimmed_text; $title[$c1]=$title2[$c2]; $c1++; ... $c2++ $count++;