in reply to How to split by character ?
From a string:local $/ = \128; while (<$fh>) { ... $_ contains 128 bytes ... }
while (length($str)) { my $rec = substr($str, 0, 128, ''); ... $rec contains 128 bytes ... }
Note that offsets should be 0-127, 128-255, etc.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |