Hi all,
I've inherited this goofy file!
I can get everything else, but I can't seperate the address info.
Example;
As you can see, it's mostly in columns. But the address is stuffed in there.
I have a line something like this;
my($col1, $col2, $col3, $col4, $col5, $col6) = split(/\s+/, $_,6);
This works great for the first row. But when it drops to the other lines everything changes.
You can't count on every address having the same number of spaces in them. And sometimes there is only an incomplete address or it's completely missing.
The firstname field starts at about the 40th column.
Is there some way I can grab everything up to the firstname as one whole column, and then each of the following columns after that?
tgus
____________________________
Families can be together forever...
I've inherited this goofy file!
I can get everything else, but I can't seperate the address info.
Example;
Code:
lastname Firstname M status 12Oct44 age
123 MapleGrove Lane Firstname F status 12Oct44 age
New York, NY 12345 Firstname M status 12Oct44 age
123-555-4567
As you can see, it's mostly in columns. But the address is stuffed in there.
I have a line something like this;
my($col1, $col2, $col3, $col4, $col5, $col6) = split(/\s+/, $_,6);
This works great for the first row. But when it drops to the other lines everything changes.
You can't count on every address having the same number of spaces in them. And sometimes there is only an incomplete address or it's completely missing.
The firstname field starts at about the 40th column.
Is there some way I can grab everything up to the firstname as one whole column, and then each of the following columns after that?
tgus
____________________________
Families can be together forever...