>From: Bryan Rockwood <address@hidden> >Organization: Creighton >Keywords: 200004271734.e3RHYfG05347 McIDAS Perl CGI BIN Bryan, Since I am not a Perl expert (more of a novice than you), Robb Kambic will jump in and help out on this one. I just chatted with Robb, and he told me that he would take a McIDAS Bourne shell script example, mcscour.sh (installed in the ~mcidas/workdata directory) and redo it as a Perl script. mcscour.sh shows how to create an environment in which multiple McIDAS commands can run sequentially. This is exactly the kind of functionality you need, so the translation of mcscour.sh should serve as a good template for your CGI BIN scripts. I hope to get the converted script back to you sometime this afternoon. *** Supporting information used for our inquiry system information base *** >Greetings. Quick question that I wanted to run by you folks. Currently, >I am writing a CGI script to allow a user to create dynamic Skew-Ts. I >would like to write this in Perl, but with my intermediate knowledge of >the scripting language, have hit a snag. Setting the environment is >simple enough, and I can run the individual commands from inside the >script. My problem is trying to get the mcenv to work. From what I have >seen so far, when running a command from inside a Perl script using the >system call, it will run with the set environment (MCPATH, etc), but only >last for the length of time it takes to run the executable. So, if I do >the following: > >print "Creating the McIDAS environment.<br>"; >system "mcenv"; >print "Environment created.<br>Creating Skew-T plot for station: >72558.<br>"; >system "uaplot.k 72558"; >print "Plot created, now creating gif.<br>"; >system "svgif.k 1 /some/directory/for/webstuff/$skewt_gif_name"; >print "Gif created, exiting the McIDAS environment and displaying >gif.<hr>"; >system "exit"; > >it appears that when the system call is made, the mcenv is lost as soon as >the script moves on. Any idea here? Thanks for any input. >Bryan Rockwood >Creighton University Tom Yoksas
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.