$MY_VT = "c:/test/terminal.exe"; $i = 2; while ($i) { print "Execute $i\n"; system ($MY_VT)== 0 or die "issues running my_vt"; wait(); $i--; }