See Getopt::Std and Getopt::Long.
In reply to Re: How to read the arguments in command line? by GrandFather in thread How to read the arguments in command line? by Anonymous Monk