BEGIN and -ew

Earle Martin perl at downlode.org
Thu Aug 10 15:41:16 BST 2006


earle at buick:~$ perl -ew 'use strict; my $foo; BEGIN { $foo = 1; }; print
"$foo\n"'
earle at buick:~$
earle at buick:~$ perl -e 'use warnings; use strict; my $foo; BEGIN { $foo = 1;
}; print "$foo\n"'
1
earle at buick:~$ 

How come?

-- 
Earle Martin
            http://downlode.org/
http://purl.org/net/earlemartin/


More information about the london.pm mailing list