Thanks for the input. I'm going to try the routine you suggested. The reason for:
@GRD = split /,"?|""?/;
is that the files may contain many different macros, such as:
ISO,Q,R,L25,F000,HGT, ,120,S,E,N,L00,L00,,3,3,, "C:WHITE"
I'm splitting up the input at , and ," I've pretty much copied the same structure for all 40 of the other commands (GRD, ISO, ISF, .....). Wondering if there is a way to compact it. Current script is 700+ lines.