Bennett Haselton wrote:
> Also I noticed that in the example below, you can have this 
> code in test.pl:
> 
> use strict;
> use test3;
> my $x = 5;
> print $x;
> 
> and run it under perl -w, without any warnings -- even though 
> the "my $x" statement clobbered the value of $x that was
> obtained from test3.pm.

This is the same behaviour as if you have

    use vars qw($x);
    $x = 2;
    my $x = 5;
    print $x

in one file. My variables, where visible, take precedence over package
variables. (Note that you can still get at the package variable with $::x or
$main::x -- it's not completely gone, nor is its value clobbered. It's only
invisible through the name $x until the end of the current block of file.)

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to