Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub number {
- my $n = -1;
- sub {
- $n++;
- $n;
- }
- }
- my $f = number();
- $f() == 0 or die "Wrong value";
- $f() == 1 or die "Wrong value";
- $f() == 2 or die "Wrong value";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement