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

Home » Public Forums » archive » 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
Checking for perl [message #52915] Wed, 07 March 2007 03:52
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Hi Folks,

I've got a little routine that takes a postscript file and, using
perl, changes the title from 'Graphics produced by IDL' to something
more meaningful. I find this makes it much easier to tell what a
minimised window is, and helps identify the filename in a gv window when
I want to email a result.

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?

Other options I'm yet to explore would be using IDL itself to do the
replacement...

Cheers!

Ben

The perl command I use goes along the lines of:

command="perl -e 's/%%Title: Graphics produced by IDL/%%Title:
"+new_title+"/' -p " + filename + " > bp_pstitle.temp"
command2="rm "+filename
command3="mv bp_pstitle.temp " + filename

spawn, command
spawn, command2
spawn, command3

--
Ben Panter, Edinburgh, UK.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
[Message index]
 
Read Message
Previous Topic: What is the difference between 'curvefit', 'lmfit' and 'svdfit' procudure?
Next Topic: Re: hist_nd question

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

Current Time: Sun Oct 12 13:57:36 PDT 2025

Total time taken to generate the page: 1.28825 seconds