My Perl Quiz

The ultimate place to learn Perl!

Question #34: What will be printed?

BEGIN {
    my $id = 0;
    sub nextval {
        $id++;
        return $id;
    }
}

my $id = 2;
$id = nextval();
print $id;