in reply to Re^3: Open Filehandle once
in thread Open Filehandle once

Timings could change from one version of perl to the next, so this kind of micro-optimization is meh. I would tend to use for over map myself in this situation, but it doesn't seem to matter all that much at this point. Whatever you do, don't write this:

@smb = map { s/\s+\z//; $_ } @smb;

Yes, I've seen people who habitually write this kind of thing. I don't know where they learned it.