in reply to ??{ } oddity

I think you want
my $re = qr/(${ \$obj->gimme_sweet_love })/;

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: ??{ } oddity
by insaniac (Friar) on Apr 28, 2005 at 17:13 UTC
    perfect!
    the following code now works as i wanted it to.. thanks a lot!

    my $re = qr/(${ \$obj->gimme_sweet_love })/; for my $match ( qw(yes yeah ja jup ok) ) { print "\$match value:", $match; print "HURAY (m)" if $match =~ m/$re/; print "count = ".$obj->cnt; }
    this gives:
    $match value:yes count = 1 $match value:yeah HURAY (m) count = 1 $match value:ja count = 1 $match value:jup count = 1 $match value:ok count = 1

    to ask a question is a moment of shame
    to remain ignorant is a lifelong shame