user
Retrieve the list of command-line arguments given to the program. For programs that only print the arguments when run directly, see 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"

```
assistant
(formerly Perl 6)
Perl 5's `@ARGV` is available as `@*ARGS`. Alternatively, if you define a subroutine named `MAIN`, Perl will automatically process `@*ARGS` according to Unix conventions and `MAIN`'s signature (or signatures, if your `MAIN` is a multi sub) and then call `MAIN` with appropriate arguments; for more detailed information see: https://docs.raku.org/language/create-cli

```
# 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
```

If the program is stored in a file, the file name is printed instead of `-e '...'`.