for my $host ( @hosts ) { my @cmd = ( "putty", "$host" ); system( @cmd ) == 0 or warn "Failed to exec '@cmd': $!\n"; }