in reply to Redirecting System command output !!

You're using double-quoted strings. BAD move on a Win__ system when calling the system command. I don't want to guess how the autoescaping is going to interact, here.

Also make sure that the perl executable is perl.exe, and that its directory is on your PATH.

Try:

system('perl engine.pl rep\sample.txt rep\sample_done.txt')

or

system('perl engine.pl rep/sample.txt rep/sample_done.txt')

The latter relies on Perl's interpolation of POSIX directory separators regardless of OS.