my @targetsite = $agent->content; foreach (@targetsite) { chomp; my @targets = $_ =~ m/.+act=attack&m=(\d+)/; # regex matched optimal push(@targets,$1); # jetzt ist die id 2 mal drinne :( if ($DEBUG == '1') { print ("DEBUG: Found Target: @targets\n");} }