$ cat .SQL/glark.pks create or replace package glark as function gragnar(t in date, TZ1 in varchar2, TZ2 in varchar2) return timestamp with local time zone; end glark; $ cat .SQL/glark.pkb create or replace package body glark as function gragnar(t in date, TZ1 in varchar2, TZ2 in varchar2) return timestamp with local time zone is retval timestamp with local time zone; begin select (from_tz(cast(t as timestamp), TZ1) at time zone TZ2) into retval from dual; return retval; end gragnar; end glark; $ cat t.pl #/usr/bin/perl use strict; use warnings; use feature ':5.10'; use XYZ::DBASE; use XYZ::Utils qw(dump_query); my $DB = XYZ::DBASE::connect('XYZDEV'); my $ST = $DB->prepare(<bind_param(':T', 'Europe/Berlin'); $ST->bind_param(':U', 'Europe/Berlin'); $ST->execute; dump_query($ST); $ perl t.pl DBD::Oracle::st fetchall_arrayref failed: ORA-00923: FROM keyword not found where expected ORA-06512: at "DEV_ROBO.GLARK", line 7 (DBD ERROR: OCIStmtFetch) [for Statement "select glark.gragnar(sysdate, :T, :U) from dual " with ParamValues: :t='Europe/Berlin', :u='Europe/Berlin'] at /Work/Perl/LIB/XYZ/Utils.pm line 342. #### select * from v$version BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production CORE9.2.0.7.0Production TNS for Linux: Version 9.2.0.7.0 - Production NLSRTL Version 9.2.0.7.0 - Production 5 rows elapsed time: 0