in reply to Loading Hash From FileHandle - Cannot Chomp Input Keys

or:
use strict; my %person; map{chomp; $person{$_} = 1} <DATA>; print join(",", keys %person); __DATA__ Ruth Samuel Paul John Silas

Replies are listed 'Best First'.
Re^2: Loading Hash From FileHandle - Cannot Chomp Input Keys
by BUU (Prior) on Dec 22, 2004 at 05:05 UTC
    While map in void context is no longer inefficient compared to a simple for loop, I still feel that map has a different meaning and should not be used in void context. It may be as efficient as a for loop to the machine, but I feel, not as efficient for the reader.