use LWP::UserAgent; use JSON; my $start_url = "http://localhost/abfrage1/42/JSON"; my $next_url; use LWP::UserAgent; use JSON; my $json = JSON->new; my $ua = LWP::UserAgent->new; my $response = $ua->get($start_url); if (not $response->is_success) { die $response->status_line; } my $hash = $json->decode($response->content); my $id = $hash{'id'}; $next_url = "http://localhost/abfrage2/$id"; $response = $ua->get( $next_url ); if (not $response->is_success) { die $response->status_line; } $hash = $json->decode($response->content);