sub values; @X; use strict; # P is a package which has some subroutines and variables that I need to use in my script. use P qw( $CurDir $a2 &guest &guest2 ); my $test = "TEST"; my $testdir = "$CurDir/$test"; # QUESTION: Do I need to use 'my' for these variables? # ERROR: If I don't use 'my' I get the error saying that $test requires explicit package name. # If I don't use 'my' don't they automatically become global? Are they not available for use? &values(); &guest(); &guest2( @X, "$test"); # QUESTION: I get an error saying that @X requires explicit package name. # How are global variable defined in a perlscript and how can they be used, for the stuff I am doing in this script? sub values{ @X = ( something something ); # QUESTION: Same error as above! Need Explicit Package name. }