http://www.perlmonks.org?node_id=191513


in reply to What are some common causes of syntax errors in queries?

i get similar error using "my" keyword to declare variable.

one way to solve it is to assign a default value right away when you declare variables with my.

ie:

$user2 ="user2"; $pass2 ="*****";
or the other way to get around is to use the following:
no warnings;
hope this helps.