in reply to adding text from different txt file into hash
Print to the third file as any of the above.open( FILE1, "file1.txt" ) or die "Unable to open file1.txt\n$!\n"; open( FILE2, "file2.txt" ) or die "Unable to open file2.txt\n$!\n"; my %hash; @hash{ map{ chomp; $_ } <FILE1> } = map { chomp; $_; } <FILE2>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: adding text from different txt file into hash
by holli (Abbot) on Apr 20, 2005 at 21:44 UTC |