I am trying to get parameters from command line and parse it and if the parameters are right call certain functions based on it.I am new to perl, can some one let know how to achieve this
script.pl aviator #switch is valid and should call subroutine aviator()
script.pl aviator debug #valid switch and should call subroutine aviator_debug
script.pl admin debug or script.pl debug admin #valid switch and should call subroutine admin_debug()
script.pl admin #valid switch and should call subroutine admin()
script.pl dfsdsd ##invalid switch ,wrong option
variant 1:
variant 2:
variant 3: