order: quantity color item quantity: /\d+/ color: # what should this be? item: 'pen' | 'pencil' #### my @colors = ('red', 'green', 'blue'); #### my @colors = ('cyan', 'magenta', 'burnt umber'); #### sub is_valid_color { my ($color) = @_; foreach (@colors) { return 1 if $color eq $_; } return undef; }