Or worse, the $1 variable will have the value of the previous time it matched and it will overwrite the existing entry in the hash.
Hm. For some reason, I was under the impression that $1 and friends would be undef after any unsuccessful match. Oh, wow, it doesn't; gross:
$ perl -lwe '$_="foo"; /(\w+)/ && print "match: $1"; /(\W+)/ || print "no match: $1";' match: foo no match: foo
In this case it wil overwrite it with the same value it already had as all values of the hash are set to "blah" (which is utterly strange).
Well, I just assumed that the original poster was using that "blah" as a placeholder for something else, for the purposes of posting. The presence of quite a few other syntactic errors makes it clear that this was not the code that actually ran...
In reply to Re^3: Immense hashes
by tkil
in thread Immense hashes
by michthedrizzard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |