#!/usr/bin/perl -w use strict; use LWP::Simple; my @manfCode; my @next_lines; my $manf; my $counter = 0; open (MANFWORKFILE, 'C:\MyWork\OptionsDB\Belkin\Wizards\PdaConfig\manf_junk.txt'); while (defined($_ = )){ if (/PDAConfigListModels\.asp/){ @manfCode = split(/manufacturerID\=/, $_); $manfCode[1] =~ s/\"\>//g; push @next_lines, scalar() if /PDAConfigListModels\.asp/; $next_lines[$counter] =~ s/^[\s]+//; print $manfCode[1].$next_lines[$counter]; $manfCode[1] =~ s/\s+//; $counter ++; my $response = get("http://web.belkin.com/config/pda/PDAConfigListModels.asp?sid=167240621&manufacturerID=$manfCode[1]"); open (INDEXFILE, '>C:\MyWork\OptionsDB\Belkin\Wizards\PdaConfig\model_junk.txt') or die ("Can't open out File: $!\n"); print INDEXFILE $response; close INDEXFILE; } } close MANFWORKFILE;