Hi,
I'm taking in a csv file and splitting it. One of the fields(doc) could
possibly have six spaces which will disrupt the program later on so I need
to substitute in dummy values. $doc == "      " finds the "empty" fields
okay but the substitution doesn't work. Clear as Mud?? Any ideas?

open (FILEHANDLE,$file);


while (<FILEHANDLE>){

                chomp;

                        ($type,$doc,$narrative,$amount,$bdate,$branch) = split(/,/);
                
                if ($doc == "      "){

                        doc =~ s/      /111111/;
_____________________________________________

Mark Martin
Computer Centre
National University of Ireland Maynooth

Tel: (01)708 4716/3830
Fax: (01)628 6249

Reply via email to