in reply to Data structure for this...
See perldsc, perlref, perldata etc.
As Limbic~Region has pointed out, if you get less values on the right than of the left side in a hash slice assignment, the hash elements that do not have a correspondent on the right side will be created with an undef value (they will exist as far as exists / keys etc. are concerned). Try this example:
@h{'a', 'b'} = qw/ one /; print "Exists!\n" if exists $h{b}; print "Undef!\n" unless defined $h{b};
|
|---|