Programming Languages C# Subjective
Mar 14, 2013

How to read file into hash array ?

Detailed Explanation

open(IN, "<name_file")
or die "Couldn't open file for processing: $!";
while (<IN>) {
chomp;
$hash_table{$_} = 0;
}
close IN;

print "$_ = $hash_table{$_}\n" foreach keys %hash_table;

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback