I don't believe the 4k limitation is in Perl. Its in the xmltype and/or the getclobval method. Read the last entry here: https://forums.oracle.com/forums/thread.jspa?messageID=1696372 . So I think I need another work around in the query. One that continues to hide the xmltype from the Perl client.