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.
In reply to Re^4: Open Filehandle once
by Anonymous Monk
in thread Open Filehandle once
by Dunkellbusch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |