For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2007 > Re: Trying to read two files using a sub to get the data, but 2nd read on the 2nd fil









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Trying to read two files using a sub to get the data, but 2nd read on the 2nd fil
Tom Phoenix

2007-01-23, 7:04 pm

On 1/23/07, Wagner, David --- Senior Programmer Analyst --- WGO
<David.Wagner@freight.fedex.com> wrote:

> I am just trying to read text files which are delimited by a
> regular end of line. I usually only read one file at a time, but thought
> it should not be that big a thing to have two file handles open and pass
> the filehandle to the sub.
>
> Can I not ready two different text files at the same time using
> two different filehandles?


What you describe should be possible.

How are you relocating the file position to the correct place in the
file, when you wish to re-read the data after the first time? Does the
subroutine use s(), or is it the caller's responsibility?

--Tom Phoenix
Stonehenge Perl Training
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com