V
vincente13
Hi all..
my $jarFile = "input.jar";
my $content = qx/jar tf $jarFile/;
$content contains the list of files in the jar file.
META-INF/
META-INF/MANIFEST.MF
searchjar/
searchjar/JARFileFilter.class
searchjar/Main.class
In the program, i would like to use regex to match line by line to
check if a specified string exists in it.
my $userInputString = "Main.class";
if(@match = $content =~ m/$userInputString/gs){
print "File is found:\t";
print @match;
}
How can i achieve to print out the result of "searchjar/Main.class"
Appreciate any help
my $jarFile = "input.jar";
my $content = qx/jar tf $jarFile/;
$content contains the list of files in the jar file.
META-INF/
META-INF/MANIFEST.MF
searchjar/
searchjar/JARFileFilter.class
searchjar/Main.class
In the program, i would like to use regex to match line by line to
check if a specified string exists in it.
my $userInputString = "Main.class";
if(@match = $content =~ m/$userInputString/gs){
print "File is found:\t";
print @match;
}
How can i achieve to print out the result of "searchjar/Main.class"
Appreciate any help