Try: $ENV{UNIX95} = "XPG4" ;
I use HP-UX also and have used this many times, although it hasn't got much to do with HP-UX. Any processes initiated by the script will have it set in their environment. hth, Craig Arnold Boeing Space and Communications International Space Station Guidance, Navigation and Control Huntington Beach, CA (714)896-3311 x68266 > -----Original Message----- > From: Craig Sharp [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, October 17, 2001 3:26 PM > To: [EMAIL PROTECTED] > Subject: [Perl-unix-users] Setting env vars in hp-ux > > Hi all, > > > > > > I wrote a script in perl for hp-ux. The script was designed to check for > a process and compare the cpu to a threshold and then alarm if the > threshold is exceeded. > > > > > > Here is the problem. I need to set a hp-ux environment variable everytime > the script is run. The script will run under cron so I cannot source the > variable. > > > > > > In hp-ux, I can use the following command: > > > > > > export UNIX95=XPG4 > > > > > > In perl I have no idea how to do this same thing. I did try the following > command: > > > > > > system ("export UNIX95=XPG4"); > > > > > > This did not work. I think the system command opens a child process for > the command and then closes it effectively destroying the variable. > > > > > > Anyone have any ideas? > > > > > > Thanks, > > > > > > Craig A. Sharp > > > Unix Systems Administrator > > > DNS Administrator > > > Roush Industries > > > Office: 734-779-7282 > > > Cell: 734-231-6769 > > > Fax: 734-779-7807 > > > [EMAIL PROTECTED] > > > ==================================================== > > > I have not lost my mind, it's backed up on tape somewhere! > > > ==================================================== > > > > > > _______________________________________________ > Perl-Unix-Users mailing list. To unsubscribe go to > http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users _______________________________________________ Perl-Unix-Users mailing list. To unsubscribe go to http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users