in reply to Outputting to browser vs DOS...how can you tell?

CGI.pm does this by checking the definedness $ENV{'REQUEST_METHOD'}. You could also go further by checking -t STDIN, though if you're not running on an interactive terminal, you'll get different results. (That may be what you want.)
  • Comment on Re: Outputting to browser vs DOS...how can you tell?