use Want 'howmany'; my ($a, $b, $c) = &{ sub{ (1) x howmany } };