# An array of twenty fives: my @fives = map 5,(1..20) ; # An array of 3 Xes # (You must be at least 18 to watch this!) my @porn = map 'X',(1..3) ; my @whatever = replicate($x,$n) ; sub replicate { my ($x,$n) = @_ ; return () if $n < 1 ; return map $x,(1..$n) ; }