my $output = "Test.txt"; my $com = '"man" , "man" , ">" , "' . $output . '" , "2>&1"';; open (TEST, " | $com") || die "Geht net \n"; close TEST || die "bad: $! $?";