in reply to Re^2: General program and related problems
in thread General program and related problems
Did you see that your program is producing an error message? It should be 'close', not 'Close' at the end
Some words on debugging. If you don't know what your program does, insert print statements to find out (or use Data::Dumper).
For example a simple print @output; before the foreach loop would have told you that @output is empty.
Then you could have looked at the previous loop where @output should have been filled. A print join('|',@fields),"\n"; or even better print Dumper(\@fields); (you also need a line use Data::Dumper for this) and print Dumper(\@output); at the end of the loop would have given you surprising results. If you want to learn something, please do the above, look at the result and think about it. If you don't find the solution, read the spoiler below.
After you solved the first problem you will see that there is a further problem, you are getting only the result of the last line in file1. The ouput of the prints or Dumper lines should give you a clue again, if not read the next spoiler
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: General program and related problems
by micky744monk (Novice) on Aug 05, 2009 at 21:44 UTC | |
by jethro (Monsignor) on Aug 06, 2009 at 00:24 UTC | |
by micky744monk (Novice) on Aug 06, 2009 at 06:31 UTC | |
by jethro (Monsignor) on Aug 06, 2009 at 08:16 UTC | |
by micky744monk (Novice) on Aug 06, 2009 at 08:45 UTC | |
|