On 08/06/2006 09:43 PM, Ralph H. Stoos Jr. wrote:
[...]
So, what I really want, is to have the script re-entrant so that I can get one file as output, and then use all the resultant files as a base to further parse.

Pardon my blathering explanation, but can I do this ??  Do I need to
make the beginning of the script a subroutine?
[...]

While you could create a re-entrant script, I think it would be easier for you to create a re-entrant subroutine. IOW, you'd create a subroutine that does these things:

1) Parse a CSV file who's name is provided as a parameter.

2) Select records that have a certain value for a chosen field; the field's name and value are supplied as parameters.

3) Create an output file containing those records and return the name of the output file.

Then you'd create a super subroutine that would repeatedly call the re-entrant subroutine with the field names, field values and input files you desire.


HTH


--
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