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 #52907 is a reply to message #52906] Wed, 07 March 2007 07:27 Go to previous messageGo to previous message
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi,
Ben Panter wrote:
> David Fanning wrote:
>
>> 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
>
> Thanks David - unfortunately that fails under linux when perl is aliased
> rather than in the path. I think I probably just have to accept that I
> need to write a multi-os code.

You could check for the OS type using the system variable !version.os_type
Depending on the result you could implement a check whether it's in the
path (windows) or spawn a 'whereis perl' or evaluate the result of "ls
-R /usr | grep 'perl' " (unix / linux). In the latter case, of course,
it might happen, that a whereis command isn't available and the method
using 'grep' may take quite some while.

Maybe that are some ideas to work out?

Best regards,
Ingo


--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
[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: Sat Nov 29 13:57:00 PST 2025

Total time taken to generate the page: 0.63614 seconds