in reply to map vs. foreach

map in void? Are you trying to invoke merlyn's wrath? :) Consider also:
while (...) { local ($, = $\ = "\n"); print @fields, "-" x 80; }
This is hypothetically "less maintainable", as people may not be familiar with $, and $\; you've got to decide that for yourself.

hdp.

p.s. tilly's idea is better than mine.