summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-05 16:12:49 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-05 16:47:39 +0900
commit1cad20e2d5179b283cbb1aabe2496449f8edcbcb (patch)
treed37cdb74fb9ce03b266495625b34ece19ef36856 /doc
parent1e7373ef3061a3e0f3010ee580e5d4f80baf2e1a (diff)
[DOC] Describe `$F`
This variation is used when `-a` option is given.
Diffstat (limited to 'doc')
-rw-r--r--doc/language/globals.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/language/globals.md b/doc/language/globals.md
index 7030cc1bfd..b22363f1da 100644
--- a/doc/language/globals.md
+++ b/doc/language/globals.md
@@ -79,6 +79,7 @@ require 'English'
| `$-i` | | Extension given with command-line option `-i`. |
| `$-l` | | Whether option `-l` was given. |
| `$-p` | | Whether option `-p` was given. |
+| `$F` | | Array of `$_` split by `$-F`. |
## Exceptions
@@ -378,6 +379,12 @@ Whether command-line option `-l` was set; read-only.
Whether command-line option `-p` was given; read-only.
+### `$F`
+
+If the command line option `-a` is given, the array obtained by
+splitting `$_` by `$-F` is assigned at the start of each `-l`/`-p`
+loop.
+
## Deprecated
### `$=`