- or download this
foreach $handle1 (@read_from) {
$buf = <$new_sock>;
if($buf){ print $buf; }
}
- or download this
foreach my $handle1 (@read_from) {
my $buf = '';
...
# Handle eof if !$rv
print $buf; # Whatever we got, including partial lines
}
- or download this
foreach my $handle1 (@read_from) {
our $buf; local *buf = \( $buf{fileno($handle1)} ); # alias
...
print $1; # Full line at a time
}
}