in reply to Re: passing qr//'d regexp via Perl/Tk Entry widget
in thread passing qr//'d regexp via Perl/Tk Entry widget
I would get what I expect...i.e. I would see:my $string = "foobarbaz"; my $exp = qr/foo/; print STDOUT "matching $exp...\n"; print STDOUT "match!\n" if $string =~ m/$exp/;
But when the regexp object qr/foo/ is instead assigned to the variable $exp via the get method, it (seems) to cease to be a regexp object. In fact, it seems to become the string literal 'qr/foo/'. So what is the get method doing to my regexp object and how can I make it stop?matching (?-xism:foo)... match!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: passing qr//'d regexp via Perl/Tk Entry widget
by crashtest (Curate) on Jun 23, 2005 at 23:42 UTC | |
by young_stu (Beadle) on Jun 24, 2005 at 00:23 UTC |