[NTLUG:Discuss] perl question

Bobby Wrenn bjwrenn at augustmail.com
Wed Jun 4 12:42:25 CDT 2003


On Wed, 2003-06-04 at 11:46, MadHat wrote:
> On Wed, 2003-06-04 at 11:38, Bobby Wrenn wrote:
> >  
> > The file will come from a M$ Excel spreadsheet. I can jerk the text out
> > and make sure there are no commas. Then I think I can look for a space 2
> > alpha characters and a new line and stick a comma back in after the
> > city. Then the only problem is to get rid of everything but the line
> > with city state and zip.
> 
> Why not export it as a CSV or XML, it would be easier to deal with.
> 
That is of course the first thing I did. Since all the states were
proper two character abbreviations, I prepended the a ~ to all the city
state lines. Then I just deleted every line that didn't have a ~. Then
deleted the ~.

Not elegant but it worked.

Thanks to All





More information about the Discuss mailing list