Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- opendir(my $h, '.') or die $!;
- sub a {
- my ($ref) = @_;
- $$ref = 100;
- }
- my $value;
- a($value);
- STDOUT->say($value); # => 100
- a(my $value);
- STDOUT->say($value); # => nothing
- sub a {
- $_[0] = 100;
- }
- a(my $x);
- print "$xn"; # => 100
- sub a {
- my $x = $_[0];
- $$x = 100;
- }
- a(my $x);
- print "$xn"; # => 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement