Jason,

> 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?

Yes. You could use a regular expression s/\.// (#UN-TESTED) should do the
trick.

> For example say I have array @records that contain the following:
>  
> Myrecord1   Myrecord2    Myrecord3    Myrecord4    Myrecord5, inc. Myrecord6,
> LP Myrecord7, LLC

Simply because it urks me. You do understand the array @records should
really have MyField1, MyField2, MyField3, MyField4, ....

> 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.

Then tab delimit it or even better pipe delimit the file.

#UN-TESTED
print join('|', @record);

> 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?

Yea, use a pipe delimited file.

Regards,
Adam



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to