|Pathologically Eclectic Rubbish Lister|
Re: Perl Bug in Regex Code Block?by stefan k (Curate)
|on Sep 03, 2001 at 16:53 UTC||Need Help??|
not that I fully understand what you're doing there, but it seems to me that you're fiddling with scopes in a very unintuitive way (at least to me). What is the scope of counts whenever you're referring to it? Within the regexp it should be the global one, shouldn't it? It is first used outside the for-loop; but OTOH it isn't declared using my, so how could it pass use strict??
Well then, running the same code under 5.6.0/Linux results in:
Then uncommenting the pattern line (your third example) yields exactly the same results. Changing my to our I get the same result as you get.
You're simply throwing away the warning we get in line 20. Is this a clever thing to do?
You know what? I'm even more confused than before I started studying the code. At least I could present another results from another perl version as you wished.