Parsing text is something Perl's really good at, so Perl has lots of ways to do it. Some of the more popular are:
- split - Useful only if you have some sort of delimiter, like ':' or ','. If you do, then split is preferred. If you don't, then split is useless.
- unpack - This is what you would use if you had some sort of fixed-width columns. Very, very powerful. (In fact, parsing is sort of a by-product of what unpack can do.)
- A regex. Regexes will do every sort of line-by-line parsing that you could ever imagine doing (and then some). However, good luck reading what you did tomorrow. (This is where Perl got its reputation for being line noise.)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.