Thanks Huck and other Monks. All the solutions work. One of the doubt I had with this, Every time when the line matches the key related to interface, we are making the hash empty and then pushing that on to Array. I was assuming the Array will only contain a list of empty hashes, But not the case when I run the script with your solution. Can you please explain or help me understand the push statement after assigning empty hash to rec
In reply to Re^2: Generation of Array of hashes by reading a file
by pr33
in thread Generation of Array of hashes by reading a file
by pr33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |