Don't ask to ask, just ask | |
PerlMonks |
Re: To read Char-by-Char from a fileby cog (Parson) |
on May 12, 2005 at 11:07 UTC ( [id://456343]=note: print w/replies, xml ) | Need Help?? |
As long as each character has one byte:
$/ = \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 Section
Seekers of Perl Wisdom
|
|