my ( undef, @headings ) = split ' ', (grep /^\s*AUID/, @lines)[0]; #### my ( undef, @headings ) = split ' ', shift @{[grep /^\s*AUID/, @lines]};