I have scanned in a book of definitions with their explanations.
I'd like to use perl to read each line in the file, filter the line, and save the various elements to a database.
For example, there are 52 lines in one file, and here is one:
1AB \'a-'be\ n (1927) : the one of the four ABO blood groups characterized by the presence of antigens designated by the letters A and B and by the absence of antibodies against these antigens
I'd want to save it like this:
data field1: AB
data field2: 'a-'be
data field3: the one of the four...
What would be the best approach for doing this? Should I place each line in an array and then strip off the firsct character in the array(over and over)and analyze each character for spaces, \, and colons until I get to the end of the array?
Any help is appreciated.
I'd like to use perl to read each line in the file, filter the line, and save the various elements to a database.
For example, there are 52 lines in one file, and here is one:
1AB \'a-'be\ n (1927) : the one of the four ABO blood groups characterized by the presence of antigens designated by the letters A and B and by the absence of antibodies against these antigens
I'd want to save it like this:
data field1: AB
data field2: 'a-'be
data field3: the one of the four...
What would be the best approach for doing this? Should I place each line in an array and then strip off the firsct character in the array(over and over)and analyze each character for spaces, \, and colons until I get to the end of the array?
Any help is appreciated.