Loading ...
Sorry, an error occurred while loading the content.
 

Re: need help with loops

Expand Messages
  • Damien Carbery
    ... I *think* you want to look at the @ARGV list. You can use the Getopts::Long module to parse the DOS entries (which I would call command line arguments
    Message 1 of 2 , May 29, 2003
      --- In perl-beginner@yahoogroups.com, "ouretski_leonid"
      <ouretski_leonid@y...> wrote:
      > Hello there
      >
      > If someone could help me with the following problem, it would be
      > greately appriciated.
      >
      > The problem:
      > - i have a program, which runs from DOS (eg. Program1)
      > - the command to run the program can have a number of different
      > arguments (eg. arg1, arg2, arg3, arg4)
      > - examples of the DOS entry:
      > Program1 -arg1 -arg2
      > Program1 -arg1
      > Program1 -arg1 -arg3
      > etc.
      >
      > Need to:
      > - have a Perl code, that would generate a list of all possible DOS
      > entries
      >
      > Hopefully above makes sence. I'll try to provide better explanation
      > if needed.
      >
      > Thanks,
      >
      > Leon

      I *think* you want to look at the @ARGV list.
      You can use the Getopts::Long module to parse the 'DOS entries' (which
      I would call 'command line arguments or switches') easily.

      Add the following line to your code:
      print "Arguments:\n", join( "\n", @ARGV );
    Your message has been successfully submitted and would be delivered to recipients shortly.