Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Here is a snippet of the code: my $MyFileHand; my $MyFileHand1; open($MyFileHand,$MyFileIn) || diet (3, $MyFileIn, $!); open($MyFileHand1,$MyFileIn1) || diet (3, $MyFileIn1, $!); proc_getrcd( $MyFileHand , $MyEOFProd,

Re: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Tom Phoenix
On 1/23/07, Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] wrote: $MyData =~ s/[[:cntrl:]]/ /g if ( $MyData =~ /[[:cntrl:]]/ ); Why the if clause? I'm not sure I understand your difficulty. But it sounds as if you're not using seek() (or something similar) to get

RE: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

Re: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Tom Phoenix
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

RE: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

RE: Trying to read two files using a sub to get the data, but 2nd read on the 2nd file goes to EOF

2007-01-23 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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