in reply to Fixed-Length Fields Question
As a general rule, any of perl's built-in functions such as unpack, split, pop, etc... do a better job (e.g. are more efficient) than trying to do it yourself with a regular expression (or with any code). There are exceptions, of course, but perl's functions are very optimized by very clever people. You can probably write something faster for a specific set of data, as the functions are generalized, but for generic data and everyday use, the built-in functions win.
|
---|