in reply to What's wrong with my syntax?

For the first problem, you're missing a semicolon in the last statement above it.
my $FWfirewallqry = $FWdb->prepare(q(SELECT FirewallID FROM firewalls +WHERE FW-name = ?))


For the second, you might want to look into using 'my' instead. See this.