I think he means:
[...] open my $fh, '>>', $file or die $!; while(<$new_sock>) { print $fh $_; } [...]
Alternatively, just add:
$|++
before the "$sock->accept()" call in your original script and the redirect to file will work.
In reply to Re^3: script to listen on a port & redirect to a file
by VinsWorldcom
in thread script to listen on a port & redirect to a file
by a31modela
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |