I suggest brian d foy's response is on target, but there's more. The windows OS needs to be CAREFULLY APPENDED include the path to the perl interpreter in the system environment variable PLUS the computer might need a RE-BOOT, or the command window in use will need a PATH revision to update the path to include that same directory location for the perl interpreter. You stated that the path was set, but not clearly; was that in the command prompt window or via the system environment variable? I suggest updating the PATH environment variable in the system via the Windows control panel.
The call to run the perl script could be made from the directory containing the perl script, or the path to the script needs to precede the call, such as: c:\directory-a\dirctory-b\file.pl ---running file.pl from c:\users\mysuername isn't going to cut it, unless that just happens to be where the perl script lives.
A debugging suggestion, add the following statements to your perl script:
print "my script runs!";
sleep 4;
and see if anything shows on the screen. If you run from the command window rather than double-clicking the file in File Explorer, the window shouldn't disappear.