in reply to dynamic regex variable
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 |