in reply to Use of Uninitialized value in substitution (s///)

In my experience it always help to visualize the data structure that I am growing be it an array or a hash using the following:
use Data::Dumper; ... print Dumper(\@array); # OR print Dumper(\%hash);
This has helped me to fix the problem very quickly.