in reply to Auto-filling an array

Sounds like you want something like
# To replace any empty value (including undefined): my @list = map { $_ || 'N/A' } @fields; # or, to replace only undefined values, leaving empty ones as empty st +rings: my @list = map { defined $_ ? $_ : 'N/A' } @fields;
Season @fields to taste (for example, @fields might be the result of another map, or a split).