in reply to Re^6: Working with fixed length files
in thread Working with fixed length files
Note that if you keep local $/ = \122; in ike1, it has a *huge* influence on performance,
That's may be because as you haven't used binmode, IO layers are still in force and are checking for the default input delimiter (newlines) even though they are not being used. By setting $/ = \nnn, it stops the input buffer being scanned as it is loaded. (Or something like that. :)
I'd expect to see similar changes with $/ = \nnn in the other routines to.
I really like your idea of binding unpack templates to an array of aliases to partitions of a buffer. Effectively 'compiling' the template much as /o (used) to compile regexes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Working with fixed length files
by Tux (Canon) on Apr 28, 2011 at 11:52 UTC |