in reply to generating a list of identical elements

I suppose using push function will be a better solution? I mean, like this:
sub makelist { my @list; for (1..$_[1]) { push @list, $_[0] }; return @list; }