@game_array = ($gamepage = ~m/onclick="document\.location\.href='([.]+)'"/g); #### #!/usr/bin/perl -w use strict; use DBI; use Data::Dumper; my $page ="http://sc2rep.com/"; #URL of page withlist ofgame pages to scrape, must be from sc2rep.com my $index=0; my $gamepage= `curl $page`; my $game_data; my @game_array; my $counter; @game_array= ($gamepage =~ m/onclick="document\.location\.href='([.]+)'"/g); open (OUT,">sc2data") or die$!; for($index<40) { $game_data = `curl "http://sc2rep.com$game_array[$index]"`; print OUT "$game_data" . "\n end_replay \n"; print "looped successfully.\n"; $index++; } close OUT; exit;