perlmeditation
xdg
<p>Sometimes, mistakes stare you in the face and you still miss them. This brief meditation is on the topic of <i>special literals</i>, one of which recently caused a frustrating bug for me. Realizing what had happened was a <i>bracing</i> reminder about when to use the <i>cruciform</i> operator.
</p>
<p>For beginning to intermediate monks, ponder the following code snippet:</p>
<code>
# 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;
</code>
<p>What will it produce? Check your answer.</p>
<div class="pmsig"><div class="pmsig-268515">
<p>-xdg</p>
<p><small><i>Code written by xdg and posted on PerlMonks is [http://creativecommons.org/licenses/publicdomain|public domain]. It is provided <b>as is</b> 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.</i></small></p>
</div></div>