in reply to How to process variable length fields in delimited file.

If the first 10 fields are of fixed length, I'd use unpack on that part. Using A10 for a 10 characted wide field will strip the trailing spaces. Work on from there.

my ($ssn, $empno, $empname, ...) = unpack "A10 A20 A12 ...", $buffer;

Enjoy, Have FUN! H.Merijn