#!/usr/local/bin/perl use b; MAIN: { my $value; b::test($value); print "\nVALUE = $value\n"; } #### package b; print "\nINSIDE-PACKAGE\n"; sub test { my ($value) = @_; $value="This is value return from sub\n"; return $value; ## If I comment this } 1;