I have to do some file processing(retrieve some value from a file and return it) in java.I can easily do this in Perl.I have written a perl script but i am unable to run it from java file.
Can anybody please help me as to how to run it or if i can do this in java alone.
My java code which calls perl script is:
while ((output = responseBuffer.readLine()) != null) {
if(output.contains(hidden_tag)){
String toRun = "perl PatternSearch.pl "+ output;
Process p = Runtime.getRuntime().exec(toRun);
}
}