in reply to Re: read a file in both directions
in thread read a file in both directions

Reading the records into a hash, and operating on them that way is probably a "better idea".

Don't you mean "Reading the records into an array..."? I assume the questioner needs to preserve the order of the records (if only so they can be accurately reversed) and hashes generally destroy that order.

A good look at "why" you need to access the data in this manner might pay off better in the long run.

Indeed!