$data{$_} = [] foreach @ARGV; while (<>) { push @{$data{$ARGV}}, $_; }