Could someone please explain the difference between: %{$self->{'DATA'}} = () }
and $self->{'DATA'} = {} I was told that they are equivalent, but they're not. One works and the other doesn't, so they must be different. Here's the context: -------------------- sub empty_db { my $self = shift; if ($self->{'USEDBM'} eq 'sql') { $self->{'SQL'}->do("DELETE from $self->{'DB'}") or $self->{'ERRMSG'} .= $DBI::errstr and return; } else { %{$self->{'DATA'}} = () } # else { $self->{'DATA'} = {} } # This does nothing } -------------------- Thanks, Frank SurfShopCART 2 http://www.surfshopcart.com/u/demo -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/