How to pass variable no of arguments in a perl script


Read With Formatting | Free Open Source Tutorials Account

Perl Programming
Thread: How to pass variable no of arguments in a perl script


SmallWonder
hello friends

I am new to perl programming.

I have to write a perl script that will take variable no of arguments and perform
accordingly. I have no idea how to handle it.

script can take arguments as follows:

myscript.pl -p
myscript.pl -l
myscript.pl -v
myscript.pl -p -l
myscript.pl -p -l -v
myscript.pl -p -l -v filename


in all these cases script will perform according to the arguments passed to it.

Please Help me.

Thanks in Advance

Manish