The problem with replacing a comma with a different character, such as a pipe symbol, is that there is a good chance that that character will turn up in the data at some point in the future. If taking this approach I think I would lengthen the odds by using a longer string rather than a single character, something like
foreach my $field ( @fields ) { $field =~ s{,}{::comma::}g; }
I hope this is of interest.
Cheers,
JohnGG
In reply to Re^2: Writing to csv file
by johngg
in thread Writing to csv file
by maestromani
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |