On Fri, 18 Mar 2005 07:46:48 -0500, zentara <[EMAIL PROTECTED]> wrote:
> On Thu, 17 Mar 2005 18:57:47 +0200, [EMAIL PROTECTED] (Offer Kaye)
> wrote:
>
> >On Thu, 17 Mar 2005 11:40:10 -0500, zentara wrote:
> >
> >> >
> >> >The above works fine , but I do not want to fork out a new perl process
> >>
After a small change This works perfectly fine thank you all
> {
> $scriptname = get_scriptname($recipient)
local(@_) = ($arg1,$arg2,$arg3);
do($scriptname);
>
> $output = $global::output;
> # This variable is set by the $scriptname
> do_something($output);
> }
> Well, yes, but the way you've designed this, you already run that risk.
>
> Now if you replaced get_scriptname() with get_subroutine(), and found a
> way to abstract out the bits that are different for each $recipient,
> then you could simplify things tremendously, and hopefully make your
> r
On Thu, 17 Mar 2005 11:19:39 -0500, Jay Savage wrote:
>
>my $loopscript = $scripts{the_one_I_need} ;
>my ($loadargv1, $loadargv2, $loadargv3) = ($var1, $var2, $var3) ;
>$loopscript =~ s/^(.+)/[EMAIL PROTECTED] = \($loadargv1, $loadargv2,
> $loadargv3\);/;
>exec $loopscript ;
>
>
On Thu, 17 Mar 2005 11:40:10 -0500, zentara wrote:
> >
> >{
> >
> >$script = foo();
> >$output = `perl $script $a $b $c `;
> >do_someting($output);
> >...
> >}
> >
> >The above works fine , but I do not want to fork out a new perl process
> >every time. Is there a way I can avoid this. I would
On Thu, 17 Mar 2005 09:32:43 -0500 (EST), Chris Devers
<[EMAIL PROTECTED]> wrote:
> On Thu, 17 Mar 2005, Ramprasad A Padmanabhan wrote:
>
> > > Okay, so we're back to my other suggestion -- "require" it:
> > >
> > > {
> > > $script = get_name_of_script(); # names matter! pick good ones
On Thu, 17 Mar 2005, Ramprasad A Padmanabhan wrote:
> > Okay, so we're back to my other suggestion -- "require" it:
> >
> > {
> > $script = get_name_of_script(); # names matter! pick good ones!
> > $output = require $script or
> > die "Couldn't 'require' $script\n$
> Okay, so we're back to my other suggestion -- "require" it:
>
> {
> $script = get_name_of_script(); # names matter! pick good ones!
> $output = require $script or
> die "Couldn't 'require' $script\n$!\n";
> do_something($output);
> }
>
No I cant use
On Thu, 17 Mar 2005, Ramprasad A Padmanabhan wrote:
> > If the code for $script is being generated by the foo() subroutine, then
> > why are you not just eval()ing on the spot?
> >
> > {
> > $script = foo();
> > $output = eval{ $script } or
> > die "Couldn't eval
> If the code for $script is being generated by the foo() subroutine, then
> why are you not just eval()ing on the spot?
>
> {
> $script = foo();
> $output = eval{ $script } or
> die "Couldn't eval code: $script\n$!\n";
> do_something($output);
> }
I
On Thu, 17 Mar 2005, Ramprasad A Padmanabhan wrote:
> I have a requirement to call a perl script within another and take
> the output
Okay.
The typical way to do this would be to make a module out of it, or at
least a "require" call, but it looks like you may be generating the code
dynamic
Hi all,
I have a requirement to call a perl script within another and take
the output
for example
{
$script = foo();
$output = `perl $script $a $b $c `;
do_someting($output);
...
}
The above works fine , but I do not want to fork out a new perl process
every time. Is there a way I can
12 matches
Mail list logo