On Tue, 2006-23-05 at 15:00 -0600, siegfried wrote:
> How do I run a perl program from a perl program? I could use the back quote
> (grave) I suppose. I could also use "system". Is there  a better way that
> does not create an additional process?
> 
> I have six perl programs running once a day (via cygwin cron). I would like
> to have a single cron job running once an hour that checks the database for
> the oldest task and, if it is more than 24 hours old, run it.
> 
> I could also write one monster program that combines all six programs. That
> is a lot of superfluous "use" statements if I'm only going to be running one
> of the six at a time.
> 
> Perhaps I could have a "switch" statement to only "require" those modules
> that have been determined to be necessary for the oldest task. Is this the
> best way?

You could use AutoLoader, see `perldoc AutoLoader`. AutoLoader only
loads subroutines when there are called. AutoLoader is shipped with
Perl.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to