The Z39.50 library contains, as an example, a gateway from XER to BER and back.
Documentation is available as perldoc in the .pm files.
I haven't bothered yet to create proper Perl modules, including an install Makefile. PL for it. Second, the Z3950.pm is partially functional. The decoding of for example GRS1 records is still broken. The asn12perl program available from the same page is necessary if you want to handle any ASN.1 specification other than the Z39.50 one.