in reply to Re: How do I safely, portably extract one or more bytes from a string?
in thread How do I safely, portably extract one or more bytes from a string?

It relies on the fact that setting the $/ input separator to a numeric value reads in that number of bytes.

You need to set $/ to a reference to a number: $/=\1;. The example you gave sets the record separator to "1", which isn't quite the same thing :-)

  • Comment on Re: Re: How do I safely, portably extract one or more bytes from a string?
  • Download Code