in reply to Re: Find most frequently used word in text file.
in thread Find most frequently used word in text file.

This is not correct. From perlop under I/O operators:

If a <FILEHANDLE> is used in a context that is looking for a list, a list comprising all input lines is returned, one line per list element.
  • Comment on Re^2: Find most frequently used word in text file.

Replies are listed 'Best First'.
Re^3: Find most frequently used word in text file.
by Bloodnok (Vicar) on Dec 20, 2013 at 09:42 UTC
    Aha, TFT hdb - good spot - it's early in the morning (for me) and my contexts are somewhat confused :-(

    My comment would be applicable if the OP was trying to slurp a file into a scalar, which they aren't. I'm not at all sure i.e. can't remember, if I've yet attempted to slurp a file into a list.

    A user level that continues to overstate my experience :-))
      Yes, I used undef $/; because I wanted to slurp the file into a scalar variable (making the subsequent processing slightly simpler). But it would not be necessary to undef $/ in a list context.