in reply to Re^4: Alternative to bytes::length()
in thread Alternative to bytes::length()
Instead of going through every single record in the file and unpacking the whole thing, it is often more efficient to use substr to get the few bytes i actually care about, and work with those. It would be similar to working with an actual character array in C.
Reading through bytes gives me the impression that Perl will try to figure out what kind of string I've got based on what's in it & where it came from unless I tell it otherwise.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Alternative to bytes::length()
by ikegami (Patriarch) on Dec 23, 2009 at 16:04 UTC | |
by WizardOfUz (Friar) on Dec 23, 2009 at 16:34 UTC | |
by ikegami (Patriarch) on Dec 23, 2009 at 17:43 UTC |