Starting your script like: perl -d scriptname.pl will bring it up in the perl debugger. Read perldebug. You may also want to dump your data structures at opportune moments with Data::Dumper.
Your code is well formatted and except for the while() loop surrounding a bunch of subroutine definitions ( the subroutine definitions should be outside the execution path ) otherwise the code is very readable. The parameter passing is incorrect however. Subroutine calls like some_sub( %hash ) are usually not correct as perl passes your hash structure as a flat list which then becomes a local copy in the subroutine. What you probably should be doing is passing a reference to the hash. See: perlreftut. This is why your data structure is not getting updated as your routines only modify their local copy of the structure.
In reply to Re^5: adding to hash/writing to file errors
by starbolin
in thread adding to hash/writing to file errors
by andrew2325
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |