Help for this page

Select Code to Download


  1. or download this
      if (-t STDIN) {
        # we're running from a shell, without input being
    ...
      } else {
        # ...
      }
    
  2. or download this
      use IO::Handle;
      STDIN->blocking(0);
    ...
      } else {
        # no input at the moment.
      }