@headings = grep /^\s*AUID/, @lines; @headings = split ' ', $headings[0]; shift @headings; #### @headings = shift split ' ', grep /^\s*AUID/, @lines;