in reply to Updating hash using it's reference ...

perlreftut , References quick reference,,
#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; my %hash = ( 1,2 ); my $ref = \%hash; dd( $ref ); $ref->{alec}='smart'; dd( $ref ); __END__ { 1 => 2 } { 1 => 2, alec => "smart" }
Modern Perl by chromatic a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.

It is reviewed and recommended by Perl Tutorial Hub

Replies are listed 'Best First'.
Re^2: Updating hash using it's reference ...
by karthikin2asic (Initiate) on Jul 12, 2014 at 08:29 UTC
    Thanks a lot for the reply. Is there a way to directly use, instead of using a package?

      Data::Dump is only there for showing you the output. Access is done through plain Perl. See the links that Anonymous Monk already provided.

      Yes, try Applefritters demo code. Just leave out the line use Data::Dumper; before trying. It is not necessary.