Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #global variable
- my $global = "foo";
- print $global . "n";
- #subroutine call
- &change($global);
- print $global . "n";
- sub change {
- change the value of global to "bar";
- return $global;
- }
- foo
- bar
- sub change {
- $global = 'bar';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement