Implemented function that calls the Perl scripts and parse the output