Question: I get a couple of syntax errors when trying to use an if-statement.

This is my code:

```
    use warnings; 
    use LWP::Simple;
    use POSIX;

    my $dtime = strftime('%Y-%m-%d %H:%M:%S', gmtime(1593953411))

    if ($dtime->day_of_week == 7 || $dtime->day_of_week == 6){
        $total_between_time = $total_between_time - $dayinsec
    }
    else{
        if (($time1+($i*$dayinsec)) + $dayinsec > $time2){
            print "beggining: ", $time1+$i*$dayinsec, " end: ", $time2, "\n";
        }
        else{
            print "beggining: ", $time1+$i*$dayinsec, " end: ", ($time1+($i*$dayinsec)) + $dayinsec, "\n";
        }
    }

```

I'm getting the following errors:

```
syntax error at ovning2.pl line 30, near "){"
syntax error at ovning2.pl line 33, near "else"

```

Why am I getting these errors?

Answer: 
You are missing a semicolon at the end of the line before your `if` statement. Fixed:

```
my $dtime = strftime('%Y-%m-%d %H:%M:%S', gmtime(1593953411));

```
Problem is not with `if` condition.

There is a semicolon missing in `my $dtime = strftime('%Y-%m-%d %H:%M:%S', gmtime(1593953411))` line.