in reply to generating a list of identical elements

If you want to use the map version:
sub makelist { my ($elem, $count) = @_; map $elem, 1..$count; }