First things first.
CPAN can offer you some useful modules for parsing ASN.1 such as
Convert::ASN1. This is not the entire answer though. You will have to convert your input text file into binary data before parsing. And I suggest you read a little more about ASN.1 such as
www.w3.org and
Wikipedia.