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

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



Thanks -- don't know how my Googl'ing missed that...

Guess I won't have to re-invent the wheel. :)

Dan

On Thu, May 18, 2006 10:48, Andy Lester wrote:
>
> 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
>
>
>
>


- - - -
"Wait for that wisest of all counselors, time." -- Pericles
"I do not fear computers, I fear the lack of them." -- Isaac Asimov
"Soon we will be able to harness the rotational energy from Orwell's grave to solve all world energy problems." -- /. user GigsVT (208848)
GPG fingerprint:6FFD DB94 7B96 0FD8 EADF 2EE0 B2B0 CC47 4FDE 9B68