in reply to Re: Hash only portion of a file
in thread Hash only portion of a file

Can you please explain this? I was under the impression $/ only matches a character or number of characters, how does it match 1 million counts of characters?

Replies are listed 'Best First'.
Re^3: Hash only portion of a file
by AnomalousMonk (Archbishop) on Jan 19, 2014 at 06:51 UTC

    That's the way it works. Please see  $/ in perlvar. (AKA  $INPUT_RECORD_SEPARATOR and  $RS. See also
        perldoc -v "$/"
    from the (update: Windoze) command line — use single-quotes in *nix (update: but see choroba's reply below).)

      As $/ is not a valid identifier name in shell (at least bash), you can use double quotes, too, as well as no quotes at all.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: Hash only portion of a file
by karlgoethebier (Abbot) on Jan 19, 2014 at 14:24 UTC
    "Setting $/ to a reference to an integer, scalar containing an integer, or scalar that's convertible to an integer will attempt to read records instead of lines, with the maximum record size being the referenced integer number of characters"

    This is really cool. I also didn't know it, because i didn't read the whole manpage ;-(

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»