$/ = \1;
Assigning $/ to a reference to an integer makes it separate input on each $x bytes ($x here being the integer).
Note: Bytes, not characters.
Try it out:
perl -pe 'BEGIN{$/=\1}s/.*/<$&>/' file
In reply to Re: To read Char-by-Char from a file
by cog
in thread To read Char-by-Char from a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |