for my $id (0 .. 100000) { $ua->get($url."?id=21&extern_eid=".(09-$id)) //rest of the code } #### for my $i (0..10000) { $ua->get('http://www-db.sn.schule.de/index.php', id => 21, extern_uid => $i); # process reply }