Sorry, but it was a logic problem and onthing else.

        I apologize for missing it, but I did.

          If you have any problems or questions, please let me know.

     Thanks.

  Wags ;)
David R Wagner
Senior Programmer Analyst
FedEx Freight
1.408.323.4225x2224 TEL
1.408.323.4449           FAX
http://fedex.com/us 

-----Original Message-----
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 23, 2007 12:13
To: Tom Phoenix
Cc: Beginner Perl
Subject: RE: Trying to read two files using a sub to get the data, but
2nd read on the 2nd file goes to EOF

        It is two different files. Sub1 and sub2 read from 1 file for 10
rcds and then closes the files and goes on to the next sub? If I have
two different filehandles pointing at two different files, why would I
have to do a seek? I am just trying to read two text files at the same
time and determine if key fields are equal or not. If not, then
determine the lower of the two, add the numeric field, read the next rcd
from this file and go back to top of the loop again and start the
compare process over.


          If you have any problems or questions, please let me know.

     Thanks.

  Wags ;)
David R Wagner
Senior Programmer Analyst
FedEx Freight
1.408.323.4225x2224 TEL
1.408.323.4449           FAX
http://fedex.com/us 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Tom Phoenix
Sent: Tuesday, January 23, 2007 12:03
To: Wagner, David --- Senior Programmer Analyst --- WGO
Cc: Beginner Perl
Subject: Re: Trying to read two files using a sub to get the data, but
2nd read on the 2nd file goes to EOF

On 1/23/07, Wagner, David --- Senior Programmer Analyst --- WGO
<[EMAIL PROTECTED]> 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 seek(), or is it the caller's responsibility?

--Tom Phoenix
Stonehenge Perl Training

**********************************************************************
This message contains information that is confidential and proprietary
to FedEx Freight or its affiliates.  It is intended only for the
recipient named and for the express  purpose(s) described therein.  Any
other use is prohibited.
**********************************************************************


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



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


Reply via email to