in reply to input data got lost in foreach loop?!
I won't even try to find errors in your script with such scant information, but I think I can still help you help yourself.
Perl has a built-in debugger and that is just what you need now. You can find the details with 'perldoc perldebug'.
The important thing, with the debugger you can single-step through the exact moment your bug happens and look at all the variables.
To get to where the interesting things happen you need to set a breakpoint. For example if you know that your script always breaks after 34050 lines, add a breakpoint inside the loop with 'b <linenumber> ++$countxy > 34048' and just let it run with the 'c' command
2 loop executions before your hot spot the script will stops at your breakpoint and you can inspect any variable with 'p <varname>' or nested data structure with 'x'. Then execute further step by step with 's' and watch what happens with 'p' or 'x' (also 'n' and 'r' help step over uninteresting parts).
If you don't know the loop count but a condition that is true when your bad stuff happens, use that for a breakpoint. You also can use 'a' to make any checks while the program runs to first find out at what loop iteration the bad stuff happens, then restart and set a breakpoint shortly before that point
|
|---|