my $first = $self->dq($op->first);
my $last = $self->dq($op->last);
- # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]"
+ # Disambiguate "${foo}bar", "${foo}{bar}", "${foo}[1]", "$foo\::bar"
($last =~ /^[A-Z\\\^\[\]_?]/ &&
$first =~ s/([\$@])\^$/${1}{^}/) # "${^}W" etc
- || ($last =~ /^[{\[\w_]/ &&
+ || ($last =~ /^[:'{\[\w_]/ &&
$first =~ s/([\$@])([A-Za-z_]\w*)$/${1}{$2}/);
return $first . $last;