my $dbh =DBI->connect('dbi:Oracle:host=hostname;sid=theSID', 'user', 'pass', { RaiseError => 1, AutoCommit => 0 }) || die "Database connection not made because:\n\t$DBI::errstr\n"; my $deptName; eval { my $func = $dbh->prepare(q{ BEGIN foo.getDept ( :parameter1, :parameter2 ); END; }); $func->bind_param(":parameter1", 9); $func->bind_param_inout(":parameter2", \$deptName, 4); # bind this parameter as an "inout" $func->execute; }; if( $@ ) { warn "Execution of stored procedure failed because:\n\t$DBI::errstr\n$@"; } else { print "$deptName\n"; } $dbh->disconnect;