comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Checking for perl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Checking for perl [message #52912 is a reply to message #52911] Wed, 07 March 2007 06:46 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Panter writes:

> My code runs on linux with spawn quite happily, but I'd really like
> to also have it run in windows. On my xp laptop this is fine - I have
> perl set up, and it's happy to be spawned. The problem comes, of course,
> when I give the code to someone else. I'd like to be able to safely
> check whether perl is installed, and if not return a *device
> independent* warning that the action wasn't possible - without crashing
> the code.... any ideas?

Maybe you could search the PATH environment variable for "perl":

IDL> thePath = GetEnv('PATH')
IDL> IF StrPos(StrUpCase(thePath), 'PERL\BIN') NE -1 $
THEN Print, 'PERL is allowed'

PERL is allowed

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: hist_nd question
Next Topic: mapping volume data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 05:02:04 PST 2025

Total time taken to generate the page: 0.24307 seconds