1. perl 如何强制一些字符 为字符串,并且可以打印。
e.g.
- #!/usr/bin/perl -w
- sub USAGE {
- print <<USAGE_EDGE;
- USAGE:
- <!DOCTY
- USAGE_EDGE
- }
- &USAGE();
2. FH, file handler.
print FH "text";
Remember there is no comma between FH and "text".
3. 用perl 去匹配多行字符
/(.+)/ 如果不加modifer s e.g. /(.+)/s, 那么这个reg不会匹配/n。
只有加了's' or 'n' 才可以匹配/n。
/(.+)/ 还没有弄明白有限次匹配选取首次匹配的情况。
/(.?)/ /(.*)/的区别