http://www.perlmonks.org?node_id=543280

Sometimes, mistakes stare you in the face and you still miss them. This brief meditation is on the topic of special literals, one of which recently caused a frustrating bug for me. Realizing what had happened was a bracing reminder about when to use the cruciform operator.

For beginning to intermediate monks, ponder the following code snippet:

# In the file 'literal.pl' package Illumination; use strict; use warnings; use Data::Dumper; my %hash; $hash{__PACKAGE__}{__FILE__}{__LINE__} = "Mu Mu"; print Dumper \%hash;

What will it produce? Check your answer.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.