I’m on Windows 8.1, 64-bit, using a standard DOS command-prompt (i.e., cmd.exe):
17:27 >cmd.exe
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
17:27 >
In Perl, I can pass an asterisk (star character, *) on the command-line with no problem:
17:27 >perl -wE "say join ' ', @ARGV;" abc * def
abc * def
17:29 >
However, in Raku it gets expanded into a list of the files in the current directory:
17:29 >raku -e "say @*ARGS.join: ' ';" abc * def
abc ch-1.pl ch-1.raku ch-2.pl ch-2.raku Session.xml test.bat def
17:43 >
So I have two questions:
- Is this documented? I’ve looked at https://docs.raku.org/language/create-cli but didn’t find the explanation I was looking for.
- Is there a way to turn off wildcard expansion when inputting * on the command line? I’ve tried prepending ^ and \, and putting the star into single and double quotes, but without success. Ideally, I’d like to change some setting in the Raku script itself, if there’s such an option.
For the record:
- Perl: Strawberry Perl 5.32.0 64bit
- Raku: Rakudo version 2020.05.1 built on MoarVM version 2020.05 implementing Raku 6.d
Thanks,
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.