in reply to dynamic regex variable

This sounds like a good place for "eval":
sub foo { my $client = 'a.b'; my $re = eval shift; grep /$re/, @_; } foo(q{qr|<$client>|}, '<a.b>', '<asb>', '<abs>'); # ==> ('<a.b>', '<asb>')

Replies are listed 'Best First'.
Re^2: dynamic regex variable
by Anonymous Monk on Oct 02, 2004 at 09:01 UTC
    eval would be too much