Command-line arguments is part of Short Circuit's Console Program Basics selection.
Scripted main
See also Program name.

For parsing command line arguments intelligently, see Parsing command-line arguments.

Example command line:

myprogram -c "alpha beta" -h "gamma"

# with arguments supplied
$ raku -e 'sub MAIN($x, $y) { say $x + $y }' 3 5
8
 
# missing argument:
$ raku -e 'sub MAIN($x, $y) { say $x + $y }' 3 
Usage:
-e '...' x y