In your "update", you are actually resetting the entire value of
$the_data[1] to point to a new hash reference, which has only y
defined.
Try this instead:
$the_data[1] = { x => 'A', y => 'B' };
print $the_data[1]->{x}, "\n";
$the_data[1]->{y} = 'C';
print $the_data[1]->{y}, "\n";
HTH,
Ricky
|
- Another Question - hashes please .. Andrew Wax
- Re: Another Question - hashes please .. Edward G. Orton
- Re: Another Question - hashes please .. Chuck . Hirstius
- Re: Another Question - hashes please .. Andrew Wax
- RE: Another Question - hashes please .. Morse, Richard E.
- RE: Another Question - hashes please .. Peter Guzis