in reply to Updating hash using it's reference ...
#!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; my @foo = ( { 'name' => 'rover' }, { 'name' => 'felix' } ); # Modify the first hashref in @foo print Dumper (\@foo); $foo[0]->{'food'} = 'Scooby Snacks'; print Dumper (\@foo);
And so you have added a key to one of the hash references in your array.
|
|---|