Help for this page

Select Code to Download


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