On Tue, 14 Dec 2004 17:00:44 -0800 (PST), Christopher Spears
<[EMAIL PROTECTED]> wrote:
> Thanks for the answer Chris!  Now my question is how
> do I find out if it is actually on my machine!  I
> don't want to have to download anything because I am
> writing this script on one machine and then I am going
> to send it to another to be used.  perl -v yields:
> 
> This is perl, v5.8.1-RC3 built for
> darwin-thread-multi-2level
> (with 1 registered patch, see perl -V for more detail)
> 
> I am using Darwin on Mac OS X.
> 
> =====
> "I'm the last person to pretend that I'm a radio.  I'd rather go out and be a 
> color television set."
> -David Bowie
> 
> "Who dares wins"
> -British military motto
> 
> "The freak is the norm." - "The Infernal Desire Machines of Dr. Hoffman" by 
> Angela Carter

The -M option to perl loads modules on the command line:

perl -MIO::Prompt -e 'print "module found\n"'

This will print module found if the module loaded, and a bunch of
errors if it didn't.  you can also use the cpan shell or perl -MCPAN
to get information on installed modules, but if all you need to know
is if it's there, the one-liner does the trick.

It's not part of the default install on OS X, though, so it's probably
not on your system.

HTH,

--jay

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to