While I was experimenting, I found out that
print ${\string}
string
to the screen.The bareword "string" is being understood as a string you simply didn't quote. use strict
would prohibit this, and use warnings
would have complained about it.
You are then taking a reference to the string (effectively, my $ref = \"string";
), and dereferencing it (effectively, ${$ref}
).
It is "normal" in the sense that life without strict
is sometimes both slippery and sharp-edged.
It's a reference to string being dereferenced with ${}
perl -MO=Deparse -e "print ${\string}"
print ${\'string';};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With