http://www.perlmonks.org?node_id=527720


in reply to Re: Microfocus Cobol datafiles
in thread Microfocus Cobol datafiles

I'm not willing to read the whole document about COBOL format, but for registries with fixed size you will probably want to use pack and unpack. For variable size, you can use split, regular expressions and subtr to do the job.

Once you have the abstraction to make the code smart enough to figure out which kind of format it uses, maybe you will want to write a module that reads the file and parses it in an easier way

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill