http://qs321.pair.com?node_id=661824


in reply to Re^2: How to copy an array to a hash?
in thread How to copy an array to a hash?

Good idea! But why use \r\n instead of \n?

Also it looks like the OP's input file might have empty lines and that could throw the sequence out of sync unless you take special care (perhaps by using \n+ ?).

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James