[Perl]Connection method isn't correct