Please in the name of whatever deity/deities you worship, stop using "split" to break up lines of CSV files and use Text::CSV or a similar library instead.
in reply to [SOLVED] Output to another file help
In the particular example, the original program is reading in an address, which is almost certain to contain a comma somewhere, and the normal way round that is to quote the field. split won't handle this, but CSV parsing libraries such as Text::CSV will take it in their stride.
A Monk aims to give answers to those who have none, and to learn from those who know more.