[Omaha.pm] Detecting interactive console vs. in a script.
Daniel Linder
dan at linder.org
Thu May 18 14:24:54 PDT 2006
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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20060518/4819d75a/attachment.html
More information about the Omaha-pm
mailing list