I am writing my very first Perl program, and am still lost with how to use split.
I have several lines of data that I want to read in, for example:
333444555 Smith Ana Ms RN
777666555 Jones Tom Mr MD
These data fields have certain restrictions. The first number always must be exactly 9 digits. The second and third can be up to 9 (anything less)..and the 3rd/4th must be exactly 2. There can be more than one space (or infinitely many spaces) as long as all data is on the same line. How could I use split here to determine this? Any suggestions you may have would be greatly appreciated!
I have several lines of data that I want to read in, for example:
333444555 Smith Ana Ms RN
777666555 Jones Tom Mr MD
These data fields have certain restrictions. The first number always must be exactly 9 digits. The second and third can be up to 9 (anything less)..and the 3rd/4th must be exactly 2. There can be more than one space (or infinitely many spaces) as long as all data is on the same line. How could I use split here to determine this? Any suggestions you may have would be greatly appreciated!
Comment