#!/usr/bin/perl -w #this is scope1.pl use strict; #comment out require 'scope2.pl'; my $z = 0; #comment out, we could also leave this # undef, but that generates a bunch of warnings for my $x (1..5) { my $y = multiply( $x ); print "$x * 3 : $y : $z\n"; } _______________________________________ #this is scope2.pl sub multiply { $this = shift; $z = $this * 3; } 1;