Re: Escaping with tr
- From: wiggins@xxxxxxxxxxxx (Wiggins d'Anconia)
- Date: Tue, 30 Aug 2005 15:32:34 -0600
Scott Taylor wrote:
>>Hi,
>>
>>How can I get all the " characters out of a csv file.
>>
>>Input looks like
>>"bla bla";"bla bla";"bla bla"
>>
>>and it has to look like
>>bla bla;bla bla; bla bla
>>
>>I tried $text=~ tr(#\"##);
>>but perl keeps complaining about "Might be a runaway multi-line ;;"
>
>
On a more serious note. Simply removing *all* double quotes can be a
dangerous proposition unless your data really does look like "bla bla"
which I somewhat doubt. Usually a delimited file like this will quote
specific fields because they may contain the delimiter, in this case a
semi-colon. Are you sure "bla bla" can't be "blah; blah blah", and then
in the future need to still be delimited by the semi-colon?
Just checking...
http://danconia.org
.
- Follow-Ups:
- Re: Escaping with tr
- From: Scott Taylor
- Re: Escaping with tr
- References:
- Re: Escaping with tr
- From: Scott Taylor
- Re: Escaping with tr
- Prev by Date: Re: Escaping with tr
- Next by Date: Re: Escaping with tr
- Previous by thread: Re: Escaping with tr
- Next by thread: Re: Escaping with tr
- Index(es):
Relevant Pages
|