http://www.perlmonks.org?node_id=784200

santhosh_89 has asked for the wisdom of the Perl Monks concerning the following question:

I want to make array/hash references from scalar value. I used eval method to convert to perl structure. I Used character inside the scalar value .it will not be single quote in value field as
( $a="a,b,{perl=>monk}").So the eval method returns null value.If i use single quote in all the values.Eval will return the correct value.Why the single quote is needed inside the scalar value (my $a="'a','b',{'perl'=>'monk'}" ),already The value is with in double quotes. otherwise anyone knows any cpan modules to solve this problem.The problems is if the string found [,{,I need to change that value to hash({) or array([) references.
The eval is given null value. my $a="[a,b,{perl=>monk}]"; my $b=eval $a; print Dumper($b); Following coding is working fine. my $a="['a','b',{'perl'=>'monk'}]"; my $b=eval $a; print Dumper($b);