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? 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 11:51 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: > $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 back to the correct data position in your file, when you call your subroutine the second time. If that's not it, can you identify which line of code isn't doing what you think it should? Hope this helps! --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/