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.
In reply to Re: How to split by character ?
by ikegami
in thread How to split by character ?
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |