Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Multiple text files

by Anonymous Monk
on May 29, 2003 at 16:24 UTC ( [id://261584]=note: print w/replies, xml ) Need Help??


in reply to Re: Multiple text files
in thread Multiple text files

Yes I do know I can have multiple file handles. Let me try to explain this another way. I have file1 which is the main file. This file is to stay open always. I only access a line in file2 if this condition exist:

if what I'm reading in file1 is true, then I go to file2 and get that line of data. if it's false I want to stay in file1 and print my output.

The problem is once I open file2 it reads the whole file and never goes back to file1. When I look at my output, it prints the first line of file1 because the condition is false. Then it prints the first line of file2 b/c the condition is true. So it goes to the file but it reads and prints the whole file. It doesn't check the next line of data from file1. I never see when the condition is false and stay in file1 again.

Replies are listed 'Best First'.
Re: Re: Re: Multiple text files
by Anonymous Monk on Jun 03, 2003 at 19:58 UTC
    Thanks for your help. I got it!!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://261584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-16 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found