in reply to Restarting a Perl script on Windows 10

?What do you have for ?
perl -V:sh

?What do you get with

sub exec { system 1, @_; exit 0; }

Replies are listed 'Best First'.
Re^2: Restarting a Perl script on Windows 10
by petro4213 (Acolyte) on Sep 23, 2019 at 08:21 UTC
    For perl -V:sh I get
    sh='cmd /x /c'
    on both machines (Win10 and Win7).

    Your suggestion with the system and exit calls works once, but if I try to restart the restarted instance of the program, I need to press the Enter key again :-(
      Are you mouse clicking on the cmd window? Is your mouse double clicking? So you click restart and the double click clicks cmd thus entering quickedit mode?