#!/usr/bin/perl use feature qw/say/; use Data::Dumper; package testBegin { $global = "I'm in the testBegin package global version"; sub show_me { print "$tag: testBegin package $global\n"; } } testBegin::show_me(); print "-"x60; print "\n"; testEnd::show_me(); package testEnd { $global = "I'm in the testEnd package global version"; sub show_me { print "$tag: testEnd package $global\n"; } }