in reply to Re: Dynamic option
in thread Dynamic option

Thanks but my problem is on how to access these options?.I want to run a for loop for all the options entered <code>

Replies are listed 'Best First'.
Re^3: Dynamic option
by ikegami (Patriarch) on Mar 16, 2011 at 06:15 UTC
Re^3: Dynamic option
by Anonymous Monk on Mar 16, 2011 at 05:31 UTC

    Hi,is there a way to add options to option values?meaning ,in the below example the option is "input" and it's values are data,modem,apps but for these values I want to add options (-nd -na -nc)?Can someone pls advise how can I achieve that?

    EXAMPLE:- findfiles -input [-nd -na ] data [-nc -nd] modem apps -des "finding fi +les" -r 1000 Basically ,pseudco code of what I want to achieve is below.Really appr +eciate if someone can give me the perlversion of the code. for each "input option value" { call function A if not exits nd call function B if not exits na call function C if not exists nc }
      You'll need a different parser.

        OP should look into Getopt::Euclid. It will provide to specify optional "sub options", in terms of plain old strings. Based on presence of those strings, run the code as you would desire. I would guess one would access a sub option, for example, as $ARGV{-input}->{-nd}.

        I personally do not want to deal with G::Euclid due to much stuffing of POD.

        Can you suggest any other idea on how can I achieve it?any idea which parser can do that?perl cannot do that?