You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delete local now allows you to locally delete a hash entry.
Technically, the delete local $hash{$key} syntax was valid in previous versions of Perl, but, unexpectedly, it didn't delete entries locally.
I think it's safe to assume that all users of this syntax really want local delete, so Perl::MinimumVersion should report v5.12 as the minimum syntax version.
You can use this code for testing:
my%hash = (0=> 0);
{
deletelocal$hash{0};
}
print'"delete local $hash{$key}" was ' . (defined$hash{0} ? '' : 'NOT '). "local\n";
The text was updated successfully, but these errors were encountered:
From perl5120delta:
Technically, the
delete local $hash{$key}
syntax was valid in previous versions of Perl, but, unexpectedly, it didn't delete entries locally.I think it's safe to assume that all users of this syntax really want local delete, so Perl::MinimumVersion should report v5.12 as the minimum syntax version.
You can use this code for testing:
The text was updated successfully, but these errors were encountered: