* Eric Brine <ikegami@adaelis.com> [2013-06-11 20:50]: > On Tue, Jun 11, 2013 at 1:21 PM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote: > > More importantly, given hash slices that *omit* non-existent keys, > > it is much harder to get the opposite behaviour. I cannot even think > > of any sensible way to do it as an expression within the same > > statement, only if I accept multiple statements, by doing such as > > > > my %second = %first{qw/a c/}; > > @first{qw/a c/} = @first{qw/a c/}; > > > > Still two statements, but this is simpler: > > my %second; > @second{qw/a c/} = @first{qw/a c/}; I purposefully tried to use hash slice syntax for this to show how hard it is to achieve the opposite of its default behaviour if that omitting non-existents is its default. But you have a point – if omitting the hash slice altogether is more concise in that case, that is another illustration right there that one default is more flexible than the other. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next