#!/usr/bin/perl use strict; use warnings; use 5.010; require LWP::UserAgent; foreach my $url ('http://www.google.de','https://www.youtube.com/') { my $pid; # Vater if ($pid = fork()) { say 'wie kann man hier feststellen, ob beide Soehne fertig sind?'; } # Sohn else { my $ua = LWP::UserAgent->new; my $response = $ua->get($url); if ($response->is_success) { say $url.' liefert '.length($response->decoded_content).' Byte'; } else { die 'Fehler '.$response->status_line.' in '.__LINE__; } } }