my @headerElements = ( 'value 1', 'value 2', 'value 3' ); @headerElements = split /\s+/, $headerStr if $headerStr;