A slightly corrected version of my _CSV with commas in the fields_ solution:
sub DataPrint {
my($Handle, $key, $hashref) = @_;
my $Data = $$hashref{$key};
$Data =~ (s/,/%2C/g);
print $Handle "$Data,";
}
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
"Is a CSV a comma delimited list. If so when creating a CSV how does one cope with
fields that have commas in them.[?]"
Hi Colin,
Sorry for the late response. I forgot the solution I had come up with earlier. I
used in a project that I tabled while I was working on another one. Try(on the
lo
On Wed, 15 Jan 2003 08:46:04 +1100, [EMAIL PROTECTED]
(Colin Johnstone) wrote:
>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
Jenda Krynicky wrote:
> ...
> my $outString = join(',',
> map {$fields{$_}} qw(SelectCity Workshop1 Workshop2 Salutation
> FirstName LastName Title CompanyName
> CompanyAddress Suburb State
> PostCode PhoneNumber Mobile EmailAddress)
> );
Or a hash slice:
On Tue, Jan 14, 2003 at 10:57:13PM +0100, Jenda Krynicky wrote:
> From: "Johnstone, Colin" <[EMAIL PROTECTED]>
> >
> > my $outString;
> > $outString = "";
> > $outString .= $fields{'SelectCity'} . ",";
> > $outString .= $fields{'Workshop1'} . ",";
> > $outString .= $fields{'Workshop2'} . ",";
> >
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
Johnstone, Colin wrote:
> Gidday all,
>
> 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?
>
>
>
Gidday all,
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?
my $filename;
$filename = "/home/bdweb8083m