in reply to Reading nested records in binary data
How do you know that substr is pretty inefficient?
Anyway, I'd use unpack for this, as it deals pretty well with extracting fixed-length stuff from strings:
my ($header, @items) = unpack "a300(a18)250", $buff;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading nested records in binary data
by Anonymous Monk on Mar 09, 2006 at 23:38 UTC | |
|
Re^2: Reading nested records in binary data
by Anonymous Monk on Mar 09, 2006 at 23:25 UTC | |
by duff (Parson) on Mar 10, 2006 at 00:49 UTC | |
|
Re^2: Reading nested records in binary data
by Anonymous Monk on Mar 09, 2006 at 23:08 UTC |