#! perl -sw use vars qw($app $FATAL); use strict; $app = 'test'; $FATAL = 'FATAL'; sub add_client() { print "******ADDING ROW TO CLIENT TABLE******\n"; print "I AM HERE\n"; my ($dbh, $clt, $prdpasswd) = @_; my $count = 1; my $cltid; my $sql = "select distinct CLT_ID from ENRMASTER..CLT order by CLT_ID"; my $sth = $$dbh->prepare($sql) or $app->error($FATAL, "can't prepare SQL statement [ $sql ] : +:$DBI::errstr"); $sth->execute(); } # 1047 my $cltid = add_client(\$dbhTarget, $clt, $passwd); add_client(); # the compiler accepts this but it wouldn't do anything useful. add_client( 'handle', 'clt_id', 'password' ); ## << Line 25 __END__ #### c:\test>209750 Too many arguments for main::add_client at C:\test\209750.pl line 25, near "'password' )" Execution of C:\test\209750.pl aborted due to compilation errors. c:\test>