Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
_fact の前の * の正確な機能/目的は何ですか?また、どのように同等に書くことができますか?
sub fact { my ($n) = @_; local *_fact = sub { my ($n, $prod) = @_; return $prod if $n == 0; return _fact($n-1, $n*$prod); }; return _fact($n, 1); } fact($n);