in reply to Re^4: incrementing array variables in a text file?
in thread incrementing array variables in a text file?

Have use strict; on makes it so that all your variables need to be declared with my. This is useful since it means that the compiler will catch simple spelling mistakes of your variable names or accidentally using the wrong type of variable as well.

Unfortunately, you haven't declared any of your variables with my so that's why you got so many initial errors. I'd recommend adding those pragmas first and fix the reported errors before attempting to change the code further.

I get your dilemma though. It really is too bad that they didn't teach you good perl coding practices from the very beginning. Would make this easier.

  • Comment on Re^5: incrementing array variables in a text file?