#!/usr/bin/perl -w
use strict;
package First;
# set the symbol: MULTIPLIER
# and make $x equal to its value.
use constant MULTIPLIER => 5*5;
my $x = MULTIPLIER;
package Second;
# set a new symbol: if $x is defined in this context,
# make this MULTIPLIER the same as the first,
# otherwise "2".
use constant MULTIPLIER => defined $x ? First::MULTIPLIER : 2;
# easy! It's an error...it's 265...it's 50? Find out :-)
print MULTIPLIER * $x, "\n";
####
BEGIN{print MULTIPLIER; print "\n";}
##
##
BEGIN {print MULTIPLIER => "\n";}
##
##
BEGIN {print MULTIPLIER * sub{return MULTIPLIER}, "\n";}
# which really ought to be written as below to get
# sane results (real obfuscation value there,
# but not really a namespace issue)
BEGIN {print MULTIPLIER * &{sub{return MULTIPLIER}}, "\n";}