There is also one important flag -n which is not mentioned in the list.-n works the same as -p, only it does not print $_ by default. It is pretty because it is the most precise way to specify options for command line arguments I have ever seen. We need two command line arguments as user's first and last name. Let's see a simple example to print command line arguments. Perl uses a special command line option ‘-s’ to facilitate the option handling for scripts. 17 - Command-line Options. Switches in this variable are treated as if they were on every Perl command line. If a directory name is specifie + d, Perl will switch to that directory before running the program. H ow do I read or display command-line arguments with Perl? Here is a beautiful Perl code example that process command line arguments with specified options. and contains the string "perl". Simple clients are programs that perform actions for users in real time, usually with a finite list of URLs to act upon. -w. This turns on warnings in Perl; for example, using this flag will cause Perl to warn you about uninitialized variables in your program. Always either use this flag, or else define use warnings; in your program. In this article we'll look at some of the most useful of these. In this way Perl can replace grep | sed in a single one-liner.. For example: perl -ne 'print "$1\n" if /Messages read: (\d+)/'