Season @fields to taste (for example, @fields might be the result of another map, or a split).# 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;
In reply to Re: Auto-filling an array
by moot
in thread Auto-filling an array
by nimdokk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |