I've been trying to learn Perl for a few days, and am still frequently surprised and sometimes mystified at how and why it does things. Here is my latest puzzle: why are the following two blocks of code not equivalent?
my $thing = '';
bless \$thing; # class is implicit
versus
my $thing = \'';
bless $thing; # class again implicit
The second form says "Modification of a read-only value attempted" on the second line.