http://qs321.pair.com?node_id=1173279


in reply to How to execute multiple commands through perl script

What happens when you execute

my $cmd2 = "start cmd /k cd c:\PerlExamples && $cmd"; system ($cmd2);
or putting it the other way around: get executing the combined command as you wish, and then you would also be able to run it in your loop. Btw.: printing the command (in my case $cmd2) shows you how perl does substitution inside paranthesis (" or ')

Hope this helps you! Rata