in reply to Re: loop inside system command
in thread loop inside system command
It would save you your loop on "while(@other_builds)".
The only downside here is that you wind up with 2 spaces between $first_build and file.c if there are no other_builds.$command_line = "c:\\execu $first_build "; # note trailing space $command_line .= join " ", @other_builds; $command_line .= " file.c";
The problem goes away if you do everything in a join:
$command_line .= join " ", ("c:\\execu $first_build",@other_builds,"fi +le.c");
|
|---|