in reply to Re: Changing Hash value in .pm file
in thread Changing Hash value in .pm file

The aforementioned Data::Dumper is the closest you'll get. Anything better would be impossible without constraints. But since you haven't said how Data::Dumper is unacceptable, it's hard to accommodate you.

Replies are listed 'Best First'.
Re^3: Changing Hash value in .pm file
by kranthi (Sexton) on Jun 20, 2008 at 05:18 UTC
    Hi, I am sorry to say that i am new to perl programming. I have less than 1 month of experience. I am unable to access the methods of Data::Dumper (rather confused which method to use). Hence please guide me.
      You'll have to change the hash (%studentInfo = ( ... );) to a hash reference ($studentInfo = { ... };).
      use Data::Dumper; print $fh Data::Dumper->new([ $studentInfo ], [qw( $studentInfo )]) ->Purity(1) ->Useqq(1) ->Dump();