Help for this page

Select Code to Download


  1. or download this
    use IO::Termios ();
    
    ...
        print {$handle} "Three!\n" if /3/;
    }
    close $handle;
    
  2. or download this
      # connect the fake pty to a process that generates output
    $ socat pty,raw,echo=0,link=/tmp/fakepty \
    ...
    
      # connect the fake pty to the current terminal
    $ socat pty,raw,echo=0,link=/tmp/fakepty -,icanon=0,min=1
    
  3. or download this
    use Fcntl qw/:DEFAULT/;
    use IO::Termios ();
    ...
    }
    
    $handle->close;