#!/usr/bin/perl use 5.016; # 1043504 my $sunday_open = 0; # element 0 of @row, or $row[0] my $sunday_openhour = 0; my $sunday_closehour = 0; my $monday_open = 1; # element 3 of @row, or $row[3] my $monday_openhour = 7; my $monday_closehour = 5; my $tuesday_open = 1; # !!! change to 0 to see the effect; # then back to 1 for a normal Tuesday workday my $tuesday_openhour = 7; # element 7 of @row, or $row[7] my $tuesday_closehour = 5; my $wednesday_open = 1; my $wednesday_openhour = 7; my $wednesday_closehour = 9; my $thursday_open = 1; my $thursday_openhour = 7; my $thursday_closehour = 5; my $friday_open = 1; my $friday_openhour = 7; my $friday_closehour = 5; my $saturday_open = 1; my $saturday_openhour = 9; my $saturday_closehour= 2; # element 20 of @ row or $row[20] my @row = ( $sunday_open, $sunday_openhour, $sunday_closehour, $monday_open, $monday_openhour, $monday_closehour, $tuesday_open, $tuesday_openhour, $tuesday_closehour, $wednesday_open, $wednesday_openhour, $wednesday_closehour, $thursday_open, $thursday_openhour, $thursday_closehour, $friday_open, $friday_openhour, $friday_closehour, $ saturday_open, $saturday_openhour, $saturday_closehour, ); say " FOR ILLUSTRATION: The var at \$row[7] will always be the seventh element\n of \@row (array element counting starts at zero)\n and the content of that var is $row[7], the value assiged in your hours_array to \$tuesday_openhour. \n"; if ($row[6] == 1 ) { say " We're open on Tuesday, starting at $row[7]a.m. until $row[8]p.m."; }elsif ($row[6] == 0) { say " Sorry, we won't be open today.\n But if you'd like to come in on Saturday, do so between $row[19]a.m. and $row[20]p.m."; }else { say "oops!"; } =head C:\Users\wheelerw>D:\_Perl_\PMonks\1043504.pl FOR ILLUSTRATION: The var at $row[7] will always be the seventh element of @row (array element counting starts at zero) and the content of that var is 7, the value assiged in your hours_array to $tuesday_openhour. We're open on Tuesday, starting at 7a.m. until 5p.m. =cut