【问题】
想要给一个Perl文件添加注释,而且是多行的注释。
【解决过程】
1.参考:
How do I enter a multi-line comment in Perl? [closed]
Re: Multi-line comments in perl code?
去试了试,搞懂了:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/perl =File decalaration Function: 【已解决】Perl中的多行注释 <blockquote class= "wp-embedded-content" data-secret= "u9ys5df4ze" ><a href= "https://www.crifan.com/perl_multi_line_comment/" data-original-title= "" title= "" >【已解决】Perl中的多行注释</a></blockquote><iframe class= "wp-embedded-content" sandbox= "allow-scripts" security= "restricted" style= "position: absolute; visibility: hidden;" title= "《 【已解决】Perl中的多行注释 》—在路上" src= "https://www.crifan.com/perl_multi_line_comment/embed/#?secret=5KkhCbU7P7#?secret=u9ys5df4ze" data-secret= "u9ys5df4ze" width= "500" height= "282" frameborder= "0" marginwidth= "0" marginheight= "0" scrolling= "no" ></iframe> Author: Crifan Li Version: 2012-12-24 Contact: admin at crifan dot com =cut use strict; use warnings; print "Perl multi line demo" ; |
【总结】
Perl中的多行注释的写法:
=xxx … … =cut |
其中xxx随便写,即可。
转载请注明:在路上 » 【已解决】Perl中的多行注释