my $query=<<"EOQ"; create or replace procedure GetNaem( dept_id IN NUMBER, dept_name OUT VARCHAR2 ) is begin select name INTO dept_name from Empl where id = dept_id order by name ; end ; EOQ my $dbh = new DBI::Oracle (or whatever module you're using with params here); # here you should bind your parameters, but I don't recall the syntax. # yours doesn't quite look right either, so I would consult the docs my $func = $dbh->prepare( $query ); $func->execute;