From: "Johnstone, Colin" <[EMAIL PROTECTED]> > Is a CSV a comma delimited list. If so when creating a CSV how does > one cope with fields that have commas in them. > > An address filed for example could be written suite 2, lvl 3. > > Do you write the field names out with quotes around them?
Yes. Though I would let Text::CSV_XS do that for me. > <snipped> > my $outString; > $outString = ""; > $outString .= $fields{'SelectCity'} . ","; > $outString .= $fields{'Workshop1'} . ","; > $outString .= $fields{'Workshop2'} . ","; > $outString .= $fields{'Salutation'} . ","; > $outString .= $fields{'FirstName'} . ","; > $outString .= $fields{'LastName'} . ","; > $outString .= $fields{'Title'} . ","; > $outString .= $fields{'CompanyName'} . ","; > $outString .= $fields{'CompanyAddress'} . ","; > $outString .= $fields{'Suburb'} . ","; > $outString .= $fields{'State'} . ","; > $outString .= $fields{'PostCode'} . ","; > $outString .= $fields{'PhoneNumber'} . ","; > $outString .= $fields{'Mobile'} . ","; > $outString .= $fields{'EmailAddress'}; Too much VB? ;-) my $outString = join(',', map {$fields{$_}} qw(SelectCity Workshop1 Workshop2 Salutation FirstName LastName Title CompanyName CompanyAddress Suburb State PostCode PhoneNumber Mobile EmailAddress) ); or at least my $outString = join(',', $fields{'SelectCity'}, $fields{'Workshop1'}, $fields{'Workshop2'}, $fields{'Salutation'}, $fields{'FirstName'}, $fields{'LastName'}, $fields{'Title'}, $fields{'CompanyName'}, $fields{'CompanyAddress'}, $fields{'Suburb'}, $fields{'State'}, $fields{'PostCode'}, $fields{'PhoneNumber'}, $fields{'Mobile'}, $fields{'EmailAddress'} Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]