HP3000-L Archives

August 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 15 Aug 2002 19:15:11 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
Can I reasonably call a perl script from another perl script? Without
resorting to system? And, with access across scripts to variables which are
currently global? Or, am I perhaps misunderstanding the entire problem?

I have a not quite 600 line perl script, which probably means I've written
some solidly amateurish code at best, or perhaps just sloppy code. This is
all very procedural, a batch process consisting of ten subroutines, four of
which are conditional, responding to results from previous subroutines. Now
that I've bothered automating this, the process (or more accurately, certain
people involved) are finding surprising, new, and original ways to, um, do
things they've not normally done before (joke about users goes here).

As such, I can envision, not only recovery scenarios (resume from step
three), but cases where I only want to run some part of the processing, for
less than all four subsets of files processed. One option for recovery would
be to come up with some very clever command line processing, with ways to
explicitly include and explicitly exclude certain steps, which would
probably take me as long as it took to write the rest of the script. Or, I
might take the script apart, putting most of the subroutines into separate
scripts, which would let me manually rerun whatever parts of the script I
wanted, passing arguments and returning results as needed.

Greg Stigers
http://www.cgiusa.com

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2