Thanks. I was using the Pipe thing, but the fact is my client wants it in Excel and to 
be able to open it immediately and not "click around with the parameters" as they are 
not Excel friendly (go figure). I appreaciate your willingness to carry the question 
out to a solution/example and not a quick fix!
 
JC

"Charles K. Clarkson" <[EMAIL PROTECTED]> wrote:
jason corbett wrote:

: I want to eliminate the ". " (periord) or "," (comma) from
: records that I return from a query, but I cannot figure out
: how to approach it. Does Perl have a way that I can match a
: string that from an array, remove a character or characters?
: 
: 
: For example say I have array @records that contain the
: following:
: 
: Myrecord1 Myrecord2 Myrecord3 Myrecord4
: Myrecord5, inc. Myrecord6, LP Myrecord7, LLC
: 
: I want to send this query out to persons in a .csv file but
: the join(",", @record) statement that I am using causes the
: and extra cell to be created at Myrecord5, inc. Myrecord6, LP
: Myrecord7, LLC. 
:
: What I am thinking is to scan records $record[4, 5, 6] by
: using regex matching, and if a comma exists, delete it or
: replace it with ";" . I am looking for some commands to do
: this, or at least point me in the right direction.
:
: Any suggestions?

You mention an extra cell. If you are using this for
import to a spreadsheet, you should be able to wrap suspect
fileds with double quotes. Try this.

$_ = qq("$_") foreach @record[4, 5, 6];
my $record_list = join ',', @record;


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328

Reply via email to