in reply to Why Does My Hash Become Undefined?

Perl is a case-sensitive language.   You must pay attention to capitalization of all use names.

Also watch out for %file_data vs. $file_data.

Seriously... one of the best development tools I ever fell in love with is Apple’s Time Machine backup system.   I absolutely fo’d-up my working directory just this morning.   No problem... back up once more (just in case I change my mind), then go back to the previous backup and ... Shazam...

Another equally-vital tool is source-code control ... even good ol’CVS, or “git.”   Each time you make a change, you commit that change.   If you do something totally-foobar, you can revert.   If you find yourself saying (as in this case), “WTF?!?!?!,” you can use its diff tool to see exactly what changed, either between your current file and the latest commit, or between any two commits.   Even if “it’s only you,” these tools and techniques are an absolute life-saver.

Replies are listed 'Best First'.
Re^2: Why Does My Hash Become Undefined?
by Anonymous Monk on Apr 08, 2011 at 13:00 UTC

    Thank you! I (obviously) did not notice the capitalized use names. I just thought I was such a wonderful programmer that I never needed any warnings! :)