http://www.thegeekstuff.com/2010/06/perl-command-line-options/
Command line options in Perl could be useful to do smaller tasks effectively.
In this article, let us review how to use Perl command line options to do the following tasks:
- Edit file content
- Handle line separator
- Check syntax errors
- Load modules
- Perform looping
- Execute perl code
- Set input line separator
- Split the input line
- etc.,
1. Perl -i Option: Edit file contents
2. Perl -l Option: Line separator handling
3.Perl -c option: Check Syntax Errors
4. Perl -M option : For Loading Modules
5. Perl -n and -p Option: Implicit Looping
6. Perl -e option: Execute perl code in command line itself
7. Perl -0 Option: Input Record Separator
8. Perl -a Option: Split the input line
本文详细介绍了Perl命令行选项的使用方法,包括编辑文件内容、处理分隔符、检查语法错误、加载模块、隐式循环、执行Perl代码、设置输入分隔符、拆分输入行等任务。
1942

被折叠的 条评论
为什么被折叠?



