When you first started learning perl, you wrote the program and were ready to wait happily for the result to output, after double-clicking, you saw that the screen flashed and then there was nothing left. There is no chance that you can see the output results.
How to solve this problem? In fact, this problem exists in all languages! The solution is to let the program output the result and continue to wait for the user's output.
That is, add two lines like this at the end of the script
print "press <Enter> to continue...";
<STDIN>
That's all.
How to solve this problem? In fact, this problem exists in all languages! The solution is to let the program output the result and continue to wait for the user's output.
That is, add two lines like this at the end of the script
Copy the codeThe code is as follows:
print "press <Enter> to continue...";
<STDIN>
That's all.