Tell me how to correctly assign 15 lines from a txt file with 5 key / values for each hash using split using 3 hashes.
Let the txt file have the following structure:
key1 value1 key2 value2 key3 value3 ... key15 value15 My actions:
1: Open file for reading
2: I want to do something like this my (%hsh1, %hsh2, %hsh3) = split(' ', $file_for_haches); but in this step I am having difficulties.
How to tell a pearl to put the first 5 lines in the first hash, in the second - the second 5 lines, in the third - the third 5 lines?
%hsh1=splice(@file, 0, 10);where @file is what gave split - Mike