Help in executing select query from perl script

Hi,
I have a perl snippet that call a select query with a bind variable,when i compile the script I'm unable to get the query output.
The same query when i fire in sqlplus fetches few rows.
The query takes bit time to fetch results in sqlplus.

my $getaccts = $lda->prepare("select distinct  usage_acct_seq_nbr 
  from svc_price sp,svc_agrmnt_line_item sali,sbscrp_Asgm sa 
 where sp.free_usage_across_acct_ind in ('Y','A') 
      and sp.svc_name=sali.svc_name 
     and sp.comm_svc_area_id=sali.comm_svc_area_id 
    and sp.charge_type_cd='F' 
    and sp.svc_price_expr_dt is null 
    and svc_agrmnt_trmntn_dt is null 
       and sali.sbscrp_id=sa.sbscrp_id 
    and sa.sbscrp_asgm_expr_dt is null and acct_nbr=?");
    
$getaccts->bind_param(1,$currAcct);
   	print (" getaccts is $getaccts \n ");

	my $sbscrp_id='0032581923';
	my @accts;
	my $returnCode = ERROR;
	if(defined($getaccts))
	{
		$getaccts->execute()|| logDBIError(" execute failed for coll_acct ");

		while ( @accts = replaceNils($getaccts->fetchrow_array() ) ) {

			         print ("Acct = $_ \n");


		}

}

First question - this looks like DBI code, you get rows from your select statement in sqlplus.

How is DBI communicating: ODBC? In other words what platform is the perl on and what platform is the db server on?