To define %hash you need to map {$hash{$_}=1}@file_data
Did the querent update the OP? This works just fine (and is less abusive):
my %hash = map { $_ => 1 } @file_data;In reply to Re^2: New to Perl
by chromatic
in thread New to Perl
by rolandomantilla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |