http://qs321.pair.com?node_id=1233695


in reply to Re^2: processing file content as string vs array
in thread processing file content as string vs array

++ in the spirit of TIMTOWTDI, but I personally don't like that version because /E0/ is too much of a magic value for me.

  • Comment on Re^3: processing file content as string vs array

Replies are listed 'Best First'.
Re^4: processing file content as string vs array (updated)
by haukex (Bishop) on May 13, 2019 at 14:12 UTC
    /E0/ is too much of a magic value for me

    I see what you mean*, but I don't mind it as much - it's explicitly documented in perlop, which I interpret as a guarantee of this API:

    The final sequence number in a range has the string "E0" appended to it, which doesn't affect its numeric value, but gives you something to search for if you want to exclude the endpoint. You can exclude the beginning point by waiting for the sequence number to be greater than 1.

    * Update: It would probably make sense to document the /E0/ with a code comment to demystify this magic!