in reply to User input from a command line by giving options a,b,c

It is really quite easy, and you would get the most from this forum if you tried to figure it out for yourself by reading the links. However, I will give you a start using Getopt::Std, which has less features than Getopt::Long but might be enough. It can be used in a couple of different ways, in this example we get the options set on the command-line into a hash:
use warnings; use strict; use Getopt::Std; my %options; getopts('abc', \%options); while (my ($key, $value) = each %options) { print "Option: $key, value: $value\n" } print "Remaining arguments: @ARGV\n";
Here is a selection of command-line calls and results:
C:\>gash.pl -ac Option: c, value: 1 Option: a, value: 1 Remaining arguments: C:\>gash.pl -ab fred jim Option: a, value: 1 Option: b, value: 1 Remaining arguments: fred jim C:\>gash.pl -c -a fred jim Option: c, value: 1 Option: a, value: 1 Remaining arguments: fred jim