#!/usr/bin/perl -w use strict; package First; use constant MULTIPLIER => 5*5; my $x; BEGIN {$x = MULTIPLIER}; package Second; use constant MULTIPLIER => defined $x ? First::MULTIPLIER : 2; print MULTIPLIER * $x, "\n";