The package name should not be omitted when the name begins with punc-
tuation unless the variable is in the main package.
"]"->[0] is force into the main package.
"a::]"->[0] is not.
if ($stash eq 'main' && $name =~ /^::/) {
$stash = '::';
}
- elsif (($stash eq 'main' && $globalnames{$name})
+ elsif (($stash eq 'main'
+ && ($globalnames{$name} || $name =~ /^[^A-Za-z_:]/))
or ($stash eq $self->{'curstash'} && !$globalnames{$name}
&& ($stash eq 'main' || $name !~ /::/))
- or $name =~ /^[^A-Za-z_:]/)
+ )
{
$stash = "";
} else {
() = '####'->[0];
() = '^A'->[0];
() = "\ca"->[0];
+() = 'a::]b'->[0];
() = 'open'->[$_]; #aelem
() = '####'->[$_];
() = '^A'->[$_];
() = "\ca"->[$_];
+() = 'a::]b'->[$_];
() = 'open'->{0}; #helem
() = '####'->{0};
() = '^A'->{0};
() = "\ca"->{0};
+() = 'a::]b'->{0};
>>>>
() = $open[0];
() = '####'->[0];
() = '^A'->[0];
() = $^A[0];
+() = 'a::]b'->[0];
() = $open[$_];
() = '####'->[$_];
() = '^A'->[$_];
() = $^A[$_];
+() = 'a::]b'->[$_];
() = $open{'0'};
() = '####'->{'0'};
() = '^A'->{'0'};
() = $^A{'0'};
+() = 'a::]b'->{'0'};
####
# [perl #74740] -(f()) vs -f()
$_ = -(f());