I would recommend using a JVM language plus the OWL API for doing programmatic processing of OWL.
NOT perl.
If you really insist on perl, and you don’t mind insane magical AUTOLOAD heavy modules with no documentation:
https://github.com/cmungall/owlhack
Unlike many modules, this doesn’t attempt to map some RDF monster into OWL axioms. It takes in a very simple JSON format and provides a very slim layer on top of that. Unfortunately there isn’t a standard JSON for OWL, so owlhack uses a custom translation as provided by OWLTools. This is a very generic axiom-oriented lispy rendering of OWL functional syntax.
Currently I’m using this module for tasks such as generating ad-hoc chunks of markdown derived from the ontology. The resulting md can then be pasted into github tracker postings, or used to generate html.
There’s also a “sed” script that comes with the library that’s useful for performing perl “s/” operations on annotation values.
It’s all a bit hacky, kind of an OWL replacement for https://github.com/cmungall/obo-scripts
Caveat emptor!