my $foo = 3; my $bar = "keyword mania"; my @blivitz = "(some set of value); #### my $bar = "keyword mania"; ... (do something); ... (and something more); bax($bar); # send $bar to sub bax for further processing ...(more code) { # bare block my @blivitz = ("7", '144', '1.16', "bat",); # @blivitz values available only in this block ... do something with the elements of @blivitz; } # end block sub bax { # and here's the sub, bax my $foo = "3"; ...do something to the value in $bar (a global) with $foo (available only in the sub); return (something); }