Doing the following in Perl v5.12.3 on macOS 10.7.2:
#!/usr/local/bin/perl use strict; use warnings; use DBI; my $db = DBI->connect("dbi:SQLite:testdrive.db") or die "Cannot connect: $DBI::errstr"; my @times = ("13:00","14:30","16:00","17:30","19:00","20:30","22:00"); my $counter = 1; for (my $d = 1; $d < 12; $d++) { for (my $t = 0; $t < 7; $t++) {
I get the warning "Found = in conditional, there should be == on addtimes.pl line 16", but there is no equal sign on this line. In addition, the cycle starts with $d == 9 . What am I missing?
Line 16:
if (($d+4) % 7 < 2 || ($t > 3)) {
Thanks.
source share