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