in reply to One sub routine call works a similar one does not.

Not that you asked this question (or want an answer) but do you really want to do this:

my $cltid = add_client(\$dbhTarget, $clt, $passwd); ... sub add_client() { ... my $sth = $$dbh->prepare($sql) ...

Unless a *SCALAR* is holding a large amount of data, this is just unnecessary. In this case (if it's DBI), you all ready have a small, easy on the stack, reference.

-derby