Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $info = qx(primercheck.hpp);
- print "primercheck.hpp is: $infon";
- # make a temp copy with cpp extension
- system("cp primercheck.hpp primercheck.cpp");
- # generate executable using gcc
- system("gcc -o primercheck primercheck.cpp");
- # set execute permissions on resulting file
- system("chmod +x primercheck");
- # call the executable
- system("./primercheck");
- # remove the temp cpp file
- system("rm primercheck.cpp");
- # optional - remove the executable file as well
- system("rm primercheck");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement