$url = $2; <-- called $url here print "$url\n"; push @urls, $new_url; # or @new_urls <-- called $new_url here.