in reply to shift split grep question

To do it without modules try:

my ( undef, @headings ) = split ' ', (grep /^\s*AUID/, @lines)[0];
or using the "Baby cart" secret operator (see perlsecret):
my ( undef, @headings ) = split ' ', shift @{[grep /^\s*AUID/, @lines] +};