in reply to generating a list of identical elements
sub makelist { my ($elem, $count) = @_; map $elem, 1..$count; } [download]