- or download this
our $foo = "foo";
{
...
}
}
quz(); # prints "$foo = foo"
- or download this
our $foo = "foo";
{
...
$foo = "foo";
}
quz(); # prints "$foo = foo"
- or download this
#!/usr/bin/env perl
use warnings;
...
Subroutine main::bar redefined at local_ex.pl line 15.
orig foo
local bar
- or download this
our $bar = "BBB";
sub foo { print "orig foo (bar=$bar)\n" }
...
baz(); # first call to baz
quz(); # second call to quz (OOPS, $bar is still undef!)
}