I'm not sure about in Perl, but you can usually do it on the command line (depending on shell).
For example, if you use the bash shell, you can say in your perl script system( "FIT_LOG=value gnuplot args" ); Tanton ----- Original Message ----- From: "Dan Fish" <[EMAIL PROTECTED]> To: "Perl List" <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 1:27 PM Subject: Setting environment variable for process spawned with system() > Okay... maybe this is just so simple that I can't see the forest through the > trees, but I've never had a need to do it before and so that inherently > makes it difficult :-) > > I've got a script that runs gnuplot via system(). In order to use a custom > path for gnuplot's "fit" regression function, It looks for the environment > variable FIT_LOG. > > How can I set an environment variable in the script that will be inherited > by the system() process? > > Thanks, > -Dan > > --- > "Old programmers never die... Unless of course they refuse to accept a few > extra CPU cycles over months of efficiency tuning... [Have times changed or > WHAT!]" > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]