good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: passing qr//'d regexp via Perl/Tk Entry widgetby injunjoel (Priest) |
on Jun 23, 2005 at 22:18 UTC ( [id://469548]=note: print w/replies, xml ) | Need Help?? |
Greetings, I feel this has more to do with the binding operator =~ than it does with your entry widgets get method. Here is the perlop snippet that makes me think so. clipped for clarity ...``=~'' binds a scalar expression to a pattern match. ... (If the right argument is an expression rather than a search pattern, substitution, or transliteration, it is interpreted as a search pattern at run time. So if you simply type in "foo" you get a match since the =~ seems to be treating it as /foo/ by default. One workaround might be to strip off the "qr/" and trailing "/" prior to the match. Here is an example of the behavior
This outputs -InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo
In Section
Seekers of Perl Wisdom
|
|