in reply to Not able to assign a hash reference.

manipulates in a way it becomes a hash reference.

You wish. It doesn't do that. Your string is a string, its not a hash reference. Maybe if you use Safest Undumper of Data::Dumper you can get a real honest to goodness hashref

  • Comment on Re: Not able to assign a hash reference.

Replies are listed 'Best First'.
Re^2: Not able to assign a hash reference.
by Ankur_kuls (Sexton) on Jul 14, 2014 at 07:18 UTC

    thanks for reply...but now when I am using it with eval() it is working...means what I did is, $q = eval($p); print $q; & now it is giving the hashref value...could u plz help me know how it happens?

      I don't understand the question

      eval is unsafe, it permits things like system "rm -rf ~ / " -- you're always getting more than a hashref

      If you only want a hashref use SafestUndumper