Develop a simple command line parser

I want to develop a simple command line parser so that then I can print the values of different options :tions.

-analyze
-filename<fileName>

Via man pages I got to know getopt command would be used.

Buut how to use it.. how to encrypt this in a perl script..

grateful if u could help

What do you mean by 'encrypt'? What are you trying to do? Your question is too vague to give specific answers to.

The getopts you describe is useful for shell scripts. If you want perl solution, you need to read perl documents.