Hi,
I am reading a set of regex, separated by comma, from database, which is in
string format and using eval to convert them in the array.
For e.g.,
String from database is 'qr/^abc .* $/,qr/xxx/'
$string = 'qr/^abc .*$/,qr/xxx/'; # this $string comes from DB
$string = '[' . $string . ']';
my @cleaners = eval($string);
When I print using Data::Dumper, the output looks like
$VAR1 = [
qr/(?-xism:^abc .*$)/,
qr/(?-xism:xxx)/
];
but i want it like
$VAR1 = [
qr/^abc .*$/,
qr/xxx/
];
Please help.
Thanks,
Rajesh