Skip to content

Instantly share code, notes, and snippets.

@Razzlegames
Created April 17, 2020 23:43
Show Gist options
  • Save Razzlegames/3656e08b36a0880164b972cd94deac46 to your computer and use it in GitHub Desktop.
Save Razzlegames/3656e08b36a0880164b972cd94deac46 to your computer and use it in GitHub Desktop.
#!/bin/perl
$num = 4;
sub a {
return $num
}
sub b {
local $num = 10;
return a();
}
print b()."\n"; # Prints 10 instead of 4 since Dynamic!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment