open (FILE, "C:\\Dokumente und Einstellungen\\ich\\Anwendungsdaten\\tor\\test"); while (my $line = ) { $line =~ /router\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)/; print "$2\n"; # name } close (FILE);