> On 22/06/17 14:49, Todd Chester wrote:
>> Hi All,
>>
>> I know how to read things on the command line.  But
>> how to other's figure out what goes together when things
>> don't arrive in order?
>>
>> For instance, from "man grep"
>>
>>  -E, --extended-regexp
>>               Interpret PATTERN as ...
>>
>>  -F, --fixed-strings
>>               Interpret PATTERN as ...
>>
>> The -E and the -F can be in any order on the command line
>>
>> Is there some module that you can send the run string
>> to with  "-E" (or similar) and it gives you back
>> what comes directly after "-E"?
>>
>> I could do this manually, but it seems to be a lot of work.
>>
>> How do they do that?
>>
>> Many thanks,
>> -T
>


On 06/21/2017 10:03 PM, Francis (Grizzly) Smit wrote:
look into function MAIN in perl6


https://docs.perl6.org/language/functions

https://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/


But they have to be in order.


http://perl6maven.com/parsing-command-line-arguments-perl6

I am not really seeing it.

For instance:

   test.pl6 --debug -f /tmp/sopemdata.txt -o /tmp/newdata.txt
   test.pl6 -f /tmp/sopemdata.txt -o /tmp/newdata.txt --debug
   test.pl6 --debug -o /tmp/newdata.txt -f /tmp/sopemdata.txt

I am not seeing how to tell them apart (other than doing it manually).

What am I missing?

-T

Reply via email to