in reply to CSV Files With Missing Values

Without getting into all the details of parsing CSV files, which others have already mentioned here, you could use:
print $data[0] || "0";
or
print $data[0] =~ m/^\s*$/ ? "0" : $data[0];

The first will work if the value of $data[0] is missing, the second if it is empty or just some whitespace.