in reply to How to read each 232 bytes of input data ?

If you want to read all your input in chunks of 232 bytes of data, you could set the magic variable $/ instead of using jettero's approach so Perl reads in records of 232 bytes length:

$/ = \232; while (<$input>) { ... }

Replies are listed 'Best First'.
Re^2: How to read each 232 bytes of input data ?
by Krambambuli (Curate) on Apr 06, 2007 at 08:41 UTC
    Just don't forget (even better, make it 'fingertip memory') to localize $/:
    local $/ = \232; ...

    Update And as Roboticus knowingly pinpointed, I should mention here for completeness that the localization should be kept 'as local as possible', so maybe the code should look like
    { local $/ = \232; while (<$input>) { ... } }