IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Perhaps I'm dense.
I'm just curious - ignore this if it requires TMI.

As I understand the situation, you've got a script S that does some stuff and before exiting sets some environment variables. Those environment variables are persistent. You want to write a Perl script that calls S and be able to read those environment variables in the Perl script (or afterwards). But you can't do so with the Perl script because of subprocess limitations. Correct?

But you say,

Workaround is to run the script before the perl script, but in this situation that's a messy hack.

How so? It seems to me that it's the best solution if you can't change script S. It sounds like the [link|http://z.iwethey.org/forums/render/content/show?contentid=25831|transparent aluminum mirror] problem again... ;-)

Cheers,
Scott.
New This is a CGI perl script
Which means that we'd have to call another script first, which calls the environment variables script, and then calls the perl script.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Perl, system, backticks, and environment variables - (admin) - (15)
         Check out %ENV - (Yendor) - (3)
             %ENV not set by subprocesses. - (admin) - (2)
                 Re: %ENV not set by subprocesses. - (jake123) - (1)
                     That assumes the values aren't calculated. -NT - (admin)
         Perhaps I'm dense. - (Another Scott) - (1)
             This is a CGI perl script - (admin)
         Parent-child environment inheritence - (kmself)
         In the script report ENV and parse that in the caller - (ben_tilly) - (7)
             Can't do that. - (admin) - (6)
                 How about writing a wrapper for the script that sources it? - (Arkadiy) - (4)
                     It's a CGI script - (admin) - (3)
                         I guess I don't know CGI ... - (Arkadiy) - (2)
                             bash script? -NT - (ChrisR) - (1)
                                 Perl CGI calling base environment script. - (admin)
                 WAG - (boxley)

No pea soup happening, I hope.
68 ms