in reply to How to execute multiple commands through perl script

Try it this way:

my $cmd = "perl Perl_Ex_1.pl"; system qq[ start /D c:\PerlExamples cmd /k $cmd ];

See start /? at your command prompt for the explanation of /D


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: How to execute multiple commands through perl script
by Anonymous Monk on Oct 04, 2016 at 20:09 UTC

    Thank you very much. This works too. Again I had to use \\PerlExamples so it wouldn't consider \P as an escape sequence. <\p>