#!/usr/bin/perl use strict; my @products = ('tshirt', 'pants', 'sweatshirt'); my @sizes = ('small', 'medium', 'large'), my @colors = ('red', 'green', 'blue'); foreach my $product (@products) { foreach my $size (@sizes) { foreach my $color (@colors) { print "$product $size $color\n"; } } } #### my @products = ('tshirt', 'pants', 'sweatshirt'); my %options = ( 'sizes' => ['small', 'medium', 'large'], 'colors' => ['red', 'green', 'blue'] );