in reply to Cannot work on second file after reading first file.

As a beginner with perl, it would do you good to learn about the debugger. It would allow you to execute each line of your program one at a time, and inspect the values of variables to confirm that things are happening as you expect. That can be very useful when the problem is one like this, where you suspect the outer program is somehow changing something.

  • Comment on Re: Cannot work on second file after reading first file.

Replies are listed 'Best First'.
Re^2: Cannot work on second file after reading first file.
by 1straw (Novice) on Feb 28, 2014 at 19:08 UTC

    Thank you for the advice! I will spend some time learning to use the debugger as well as Data::Dumper.