I am receiving files from our illustrious lan team that are supposedly CSV files. Unfortunately they dont have quotes around text (as specially text containing commas!) I am writing a program to fix this problem.
My Problem:
I have extracted each of the sections delimited by commas, there are six fields and I used this statement :
($f1,$f2,$f3,$f4,$f5,$f6) = $_ =~ m/(^.*,)(.*,)(.*,)(.*,)(.*,)(.*)/;
now how do I determine if $f6 has valid data? It should be null if there are not 5 commas correct? Yes I know it's probably amazingly simple but I can't figure it out. :( |