You learn something new about perl every day

broquaint on 2002-04-24T19:59:40

Apparently qr// returns a blessed reference, and a brief inspection with blessed() reveals that it is of the type Regexp

shell> perl -MScalar::Util=blessed -e 'print blessed(qr/^\s*$/), $/'
Regexp
Huh. I imagine a good dig at the perl source might explain how and why this is (something to do with the /o flag apparently).

I also had it driven into me (once more) as to why pdcawley glows with evil light when he demonstrated how to do tail call optimization in perl for his upcoming Scheme interpreter. If this is productive coding (which it most certainly is) then I fear to see what he could do when wields his power with the intent of doing "evil things" ...

broquaint out