|Come for the quick hacks, stay for the epiphanies.|
Additionally (shooting in the dark). With Oracle there are major differences between local and remote databases and the way you connect to them. The most reproducible way of getting a good connection is to use the Oracle Instant Client.
The most recent version of OIC is 19.6. You require OIC-18 or up to connect to Oracle 12.2 or higher, so if your DBD::Oracle is compiled against old client libraries and you connect to Oracle Server 12.2 or higher, you might be able to connect, but the connection (if you connected) might return weird results.
You can check your client and server version most likely in a working Oracle environment by just starting sqlplus.
This shows a client version 188.8.131.52.0 connected to a server version 184.108.40.206.0
Also note that Oracle shows both 12.1 and 12.2 as 12c, and the two are really different!
So, even with an old(er) perl, check what OIC you are using and if your DBD::Oracle is compiled against that. If you ar not sure, be sure and just recompile from scratch.
Why like this and not simply use cpan DBD::Oracle? Well, the described process will show you a lot of feedback and might ask you questions. Doing it interactively makes you (more) aware of the pitfalls.
Enjoy, Have FUN! H.Merijn