use warnings; use strict; for my $i (1 .. 5) { for my $shirt (qw(T S L H)) { for my $size (qw(S M L XL 2X)) { for my $col (qw(BLU GRN WHT BLK)) { print 'SKU', $i, $shirt, $size, $col, "\n"; } } } }