Well, one thing (not to sound like a jerk), but you're gonna get reamed if you don't change this line in your example:
my @hosts = map { $_ = qq/host$_/; } (1..400);
Since you're modifying something in a map, which many people will gripe about on style points... but it's also useless and misleading to boot. Try just:
my @hosts = map { qq/host$_/ } (1..400);
Instead. Yeah, I know it's a minor nit-picky point, but, IMHO, when you put something out for the community, you want it to look polished.
Anyway, good luck!
------------
:Wq
Not an editor command: Wq