in reply to Mini-rant about 'strict'

Since using a variable that you haven't assigned anything to is a core feature of Perl, I don't see how this could be avoided. I think you might have been tripped up by your knowledge of Perl here. A newbie would probably not expect those values to be in %hash before running the line that assigns them to it.

Replies are listed 'Best First'.
Re^2: Mini-rant about 'strict'
by Ovid (Cardinal) on Aug 04, 2004 at 20:42 UTC

    I think you might have been tripped up by your knowledge of Perl here.

    Thanks, but I think you're being far too generous here :) I was being incredibly stupid and even the warnings pragma didn't help because I was using exists. I spent quite some time debugging keys -- and it took a long time between runs to generate those keys -- before I realized that my keys were perfectly valid the first time I created 'em. It's things like this which make me drool for Haskell at times (where I can validly use the variable prior to the declaration and assignment (well, it's not really declaration and assignment, I suppose.))

    Cheers,
    Ovid

    New address of my CGI Course.