OP's code is perfect double quotes misuse case, use strict and use warnings would alarm about potential problem
use strict;
use warnings;
use feature 'say';
print "Content-Type: text/html\n\n";
my @args = ("java", "-jar", "C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar");
say for @args;
Output
Unrecognized escape \R passed through at misuse_double_quote_1.pl line 6.
Unrecognized escape \A passed through at misuse_double_quote_1.pl line 6.
Unrecognized escape \A passed through at misuse_double_quote_1.pl line 6.
Content-Type: text/html
java
-jar
C:SERSRAJENDRAPRASADHCLIPSEWORKSPACEAPPLICATIONPROTECTOR ARGETAPPLICATIONPROTECTOR-0.0.1-SNAPSHOT.JAR
Perl interpreter performed interpolation of double quoted string by expanding backshash sequences.
Correct code for @args = ('...','...','...')
use strict;
use warnings;
use feature 'say';
print "Content-Type: text/html\n\n";
my @args = ('java', '-jar', 'C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar');
say for @args;
Output
Content-Type: text/html
java
-jar
C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar
More natural way would be to write code as
use strict;
use warnings;
use feature 'say';
say "Content-Type: text/html\n";
my @args = qw/java -jar C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar/;
say for @args;
system(@args);
Output
Content-Type: text/html
java
-jar
C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar
use warnings;at the top of your script like you should be doing?@argsto see what it holds?"inmy @args = (....)?my @args = qw/java -jar C:\Users\RajendraPrasadH\eclipseworkspace\ApplicationProtector\target\ApplicationProtector-0.0.1-SNAPSHOT.jar/;instead and see result.