in reply to Referring to another perl script....
Sure, its possible, but is generally more complex than it's worth. You could try:
# %params defined elsewhere, holding CGI input data open(OUT, '|-', '/path/to/cgi') or die $!; foreach my $key (keys %params) { print OUT "$key=$params{$key}\n"; } close(OUT);
It's generally easier to load the second CGI's subroutines into a module and use them from there. The example above will work in one simple (though common) case and fail in a thousand others.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Referring to another perl script....
by Alex (Initiate) on May 06, 2003 at 16:46 UTC |