Especially it's suggestion to use the debugger.
Roughly:
> perl -dw prog.pl
Loading DB routines from perl5db.pl
Enter h or `h h' for help.
main::(prog.pl:3): my $firstline;
DB<1> c 123
main::(prog.pl:123): %hololoh # has just been loaded w/ first value
+s
DB<1> x %hololoh
0 HASH(0x3e5e54)
...