There is probably an easy solution to this but I can't figure it out. I am looking to:
- take a CSV file into an array and...
- loop through the array and split fields into variables
[b]- if the array field is empty then set the variable to "N/A"[/b]
[italic][b]Note: it is only the setting the $variable to "N/A" that I can not get[/b][/italic]
foreach $var (@list)
How would I set $date to "N/A" if the field in the array is empty??
so to produce:
$name = Jim
$date = N/A
$size = small
I Hope this makes sense to someone and I hope there is an easy fix!