#!/usr/bin/perl -w use strict; our $test = "teast"; print "main:: $test\n"; &foo::out(); package foo; sub out {print __PACKAGE__ . ":: $test\n"}; 1;