in reply to command line switches (array)

Have you looked at the Getopt::Long module? It does what you want (and more, but...).

Replies are listed 'Best First'.
Re^2: command line switches (array)
by blackice69 (Initiate) on Nov 01, 2010 at 13:38 UTC
    yeah but unfortunately they say you can do it without it using just an array and etc.

      I guess you will have to program the business logic of what parameters are required in which combinations yourself.

        Oh. I thought that Getopt::Long was in the core, but it seems it actually isn't but only Getopt::Std. So the OP will have to make-do with that.

        ya no this isn't a home work assignment. This is a task from work which has been given to me but unfortunately they will not install any modules, none what soever and will not give me access to anything except to write this script.. ultimatly what it does is parses a logfile and useraccounts file and searches for certain strings such as times and usernames. I have never done perl before but yet I am being told to do this! anything would be of help! anything..