use feature 'current_sub';
@a = map{[split]} <DATA>;
($m, $n) = (20, 1);
sub {
 $s = '';
 map{0 == $n % $$_[0] and $s .= $$_[1]} @a;
 $s ||= $n;
 print "$s\n";
 $n++, goto __SUB__ if $n < $m;
}->(1);
__DATA__
3 fizz
5 buzz
7 Pop
11 Jazz


注) Perl の「goto 関数」は continuation