Strings In Depth8 / 18
Up next

Repeat with x

use strict;
use warnings;
use feature 'say';

# x repeats a string
say "ab" x 3;        # ababab
# on a list in parens it repeats the elements
my @zeros = (0) x 4;
say "@zeros";        # 0 0 0 0
What you're solving

x repeats a string or a list