From: Roland G. <RGi...@cp...> - 2002-08-04 20:51:42
|
>>Hmm, I offhand don't know a means to find out if a given scalar already >>contains a precompiled regexp. If such a check is available I'd surely >>implement it to make expect() even more DWIMmish in that regard, making >>sure that a precompiled regexp wouldn't be handled with a substr match... >> >>Anybody got an idea? >> >> > > $foo = qr /stuff/; > print ref($foo); > > prints "Regexp". Is that what you mean? *smack* Ugh, yes, and I was looking into Scalar::Util and thought about digging into perl internas and write some .xs code... Looks like it's time to add some more DWIM to Expect... Roland -- RGi...@cp... |