Bad argument while running the program




Hi,

I have written a PERL script to connect to TERADATA. While executing the
script, it throws an error as below mentioned,





Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at
D:/Perl

/lib/Socket.pm line 373.



Can anyone help me to resolve this error. The script we have written is
given below,



use DBI;

use strict;

my $driver="Teradata";

my $server="<STDIN>";

my $database="test";

my $url="DBI:$driver:$database";

my $user="<STDIN>";

my $password="<STDIN>";



my $dbh = DBI->connect($url,$user,$password) or die

"Failure!\n";

print "Success!\n";

$dbh->disconnect();





Thanks & Regards,

Radha Krishnan



This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

Relevant Pages

  • Re: Need a good Unix script that..
    ... use strict; ... I'm trying to write a script to delete all line that include a certain ... The information contained in this communication (including any ... delivering it to the intended recipient, ...
    (freebsd-questions)
  • Re: Critcize my scripts.
    ... > (I know it's a good practice to put use strict in Perl ... > use strict.The script below work fine if I comment out ... perldoc -f use ... Sub Routines ...
    (perl.beginners)
  • Re: [PATCH] Speed up "make headers_*"
    ... 'use strict' and 'use warnings' is recommended. ... The parentheses are not needed for most of the built-in functions. ... More or less the same comments would apply to the next script as well. ...
    (Linux-Kernel)
  • Re: tricky list comparison problem
    ... > I'm having a bit of an issue with a script I'm working on. ... > - 69078878" as available sectors. ... > use strict(); ... You are telling perl to load the 'strict' module and then you are telling the ...
    (perl.beginners)
  • Re: Regular Expression and file editing.
    ... Goksie wrote: ... If i run the script, the changes could not be effected bcos the files is ... use warnings; ... use strict; ...
    (perl.beginners)