|Don't ask to ask, just ask|
Dividing up Long Linesby moe79 (Initiate)
|on Jun 21, 2012 at 16:16 UTC||Need Help??|
moe79 has asked for the
wisdom of the Perl Monks concerning the following question:
I need to keep address lines in a file at a maximum of 30 characters. I have a file with these columns:
I am looking to use perl to check if Address_Line_2 is greater than 30 characters.
If it is, I need to divide Address_Line_2 between Address_Line_2 and Address_Line_3, but only if Address_Line_3 is blank.
If I need to divide Address_Line_2, I would like to divide it at a point in where there is a space.I'm reading the file in like this: