in reply to Basic Print statement question

This is the program I came up with from your description (I hope it's what you meant). Problems are often better described with code, rather than English.
use strict; use warnings; my $variable = 1; print $variable; subroutine(); sub subroutine { my $variable = 2; print $variable; } #Output: #12

Each print prints the value of the $variable it's closest to (in this example only, it's not a rule).

I fairly sure you will benefit from reading Coping with Scoping. It'll help you understand Perl's notion of global and local variables.