[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Detecting interactive console vs. in a script.




On May 18, 2006, at 10:19 AM, Daniel Linder wrote:

Has anyone seen a good way to determine if a Perl script is running on an interactive console vs. within a shell or Perl script? I have a code snippet that I want to print more text to a console for the user to view, but if it is within a script I don't want to clutter its output.

This is covered in detail in the FAQ.

$ perldoc -q interactive

Found in /System/Library/Perl/5.8.6/pods/perlfaq8.pod
       How do I find out if I’m running interactively or not?


--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance