Well . . . (gah, this almost got eaten by the server hiccups)
- Why use sprintf when "$user\@$host" would work just fine (or join( '@', $user, $host ))
- Don't use printf where a simple print will do
- You don't need the C-style for loop: for my $idx ( 0 .. $#host ) { print "[$idx] $host[$idx]\n"; }
- Name your arrays with plurals (e.g. @hosts)
- No error checking on the exec call (that's kinda pedantic though)