#!/usr/bin/perl use strict; use warnings; use Data::Dumper; # Any Choice or combination coming from a form: my $test1 = "1"; my $test2 = ""; my $test3 = ""; my @acc = ('AX1', 'AX2', 'AX3',); my @sec = ('PB6', 'PB7', 'PB8',); my @third = ('XC2', 'XC8', 'XC1',); my $result; for (my $l = 0; $l < @acc; ++$l) { $result = $acc[rand @acc]; if($test2){ for (my $k = 0; $k < @sec; ++$k) { my$c2 = $acc[$l]; my$week2 = $sec[$k]; $result = $acc[$l].$sec[$k]; } } =code if($test3){ for (my $y = 0; $y < @third; ++$y) { my $days = $acc[$l]; my $week = $sec[$k]; my $holy = $third[$y]; $result = $acc[$l].$sec[$k].$third[$y]; } } =cut } print " $result\n";