in reply to Re: Re: while loop not working
in thread while loop not working
The problem is that you seem to be aware that
while( <IN> ) {...
reads a single line, hence you need to loop back to read the next one, but then when you get to
if(/POLY/) { $final_gset[$i] = <IN>; ...
you seem to be expecting that line to somehow magically read multiple lines. It won't.
I might go into a more detailed explanation, but I still think that you don't need to write this program. You are (trying to ) read all the lines from one file and then append them to another. This would be much more easily accomplished using
C:\> type graph_set.txt >>test.txt
or$ cat graph_set.txt >>test.txt
depending which view of the world you see as being rightous:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: while loop not working
by Skeeve (Parson) on Jul 16, 2003 at 06:42 UTC | |
by BrowserUk (Patriarch) on Jul 16, 2003 at 07:29 UTC |