Repository navigation
Command reference
All REPL commands and subcommands must be uppercase, including DUMP and PEEK.
Lowercase Perl keywords and defined functions retain their meaning. The
explicit definition tags and immediate list shorthand have their own small
grammar; see all shortcuts and shorthand forms.
Filenames, variable names, and values retain their case.
Lowercase eval is Perl's keyword. Quote filenames and arguments containing
spaces. Type HELP in AnteREPL for the complete offline reference, including
screen keys, startup switches, defaults, and literal-input rules.
Shorthand definitions start directly with E: E s triple return 3 * shift.
Bare named lists look like colors red, blue. EVAL always takes literal Perl;
E reserves the five spaced definition tags. Destructive shortcuts
ask Continue? [y/N]; append ! to bypass the question (D1!, R2!, Q!).
New values/files do not ask. Full command names keep their existing behavior.
See the shorthand guide for all force forms, quoting rules, and batch behavior.
| Input | Result |
|---|---|
| Ordinary Perl | Execute immediately, except during AUTO |
10 code |
Insert/replace line 10; supply a missing statement semicolon |
10: exact source |
Store one literal physical line |
10 |
Delete line 10 |
AUTO [start [step]] |
Automatic numbering; default step 5, default start after highest number |
AUTO OFF |
End AUTO; Ctrl-C or Ctrl-D during entry also ends it |
AUTO ECHO ON / AUTO ECHO OFF
|
Echo assigned numbered entries; OFF by default, independent of AUTO mode |
: exact source |
Literal one-line entry during AUTO |
RUN |
Evaluate the whole program in numeric order |
EVAL code |
Execute Perl explicitly, including during AUTO |
EVAL do { ... } |
Execute multiline blocks together without storing them |
EVAL sub name { ... } |
Define a function in the current session's symbol table without storing its source |
FUNCTIONS |
List defined functions alphabetically in the current workspace, including imports; takes no arguments |
? expression |
Evaluate in scalar context and display the result |
DUMP expression |
Display with Data::Dumper, e.g. DUMP \%ENV
|
PEEK expression |
Inspect with Devel::Peek, e.g. PEEK $FOO, 10
|
Editing numbers range from 1 to 999999999. AUTO skips existing numbers; explicit numbered entries can replace them. Blank input does nothing.
Session functions are callable by immediate code and RUN. They do not enter
LIST or SAVE. Redefining a named subroutine through ordinary Perl replaces it
with Perl's usual warning and no confirmation prompt. Shorthand
redefinitions ask first; E! s ... bypasses that question. Existing code
references keep the old body.
FUNCTIONS also works during AUTO and lists only live names, excluding other
packages and forward declarations without a body. See
session-only functions and
listing functions.
| Command | Result |
|---|---|
LIST |
All stored source, with aligned number column |
LIST 10 |
One line |
LIST 10-50 |
Inclusive range |
LIST 10- / LIST -50
|
Open-ended range |
LIST10-50 |
Compact range spelling |
LIST [range] SLOW |
Start slow |
LIST [range] PAUSE |
Pause after each screenful |
EDIT |
Edit program source in $EDITOR / $VISUAL / platform fallback |
DEL range / DELETE range
|
Delete a line or range |
RENUM [start [step]] |
Renumber, default start 10 and step 10 |
REORDER [start [step]] |
Alias for RENUM |
UNDO |
Reverse a source edit; up to 50 retained |
CLS |
Clear VRAM interior and resize bank; keep border, legend, program, variables, environment, and AUTO |
RECOVER |
Replace current screen with its pre-shrink copy, if the terminal is large enough; screen mode only |
NEW / CLEAR
|
Clear source and its save filename; keep workspace |
RESET |
Fresh workspace; keep source and process environment |
STATUS |
Line count, save state, filename, and active AUTO next/step |
LIST controls: Space pauses/resumes, S changes speed, Enter steps, and Q/Esc/Ctrl-C stops. Other typing/movement ends LIST and goes to the screen editor. Plain/batch output never pauses. See screen keys.
| Command | Result |
|---|---|
LOAD file |
Read native numbered source or ordinary Perl; no execution |
IMPORT file |
Read ordinary Perl as an unsaved copy without adopting filename |
SAVE [file] |
Write source; reuse remembered filename and format if omitted |
SAVE file.pl |
Select plain source format |
SAVE file.bperl |
Select numbered format |
EXPORT file |
Plain source plus default-pragmas prelude |
Other SAVE extensions retain the current format. Plain LOAD uses numbers 10,20,... . Changed EDIT source uses the same numbering; unchanged EDIT keeps the previous numbers.
LOAD, IMPORT, NEW, CLEAR, QUIT, and EXIT guard unsaved source.
Only these accept a force suffix: LOAD!, IMPORT!, NEW!, CLEAR!,
QUIT!, and EXIT!. SAVE and EXPORT replace the named destination.
| Command | Result |
|---|---|
ENV [name] |
All environment entries or one variable |
ENV SET name value |
Set literal value; quote spaces or an empty string |
ENV UNSET name |
Remove variable |
EDIT ENV / ENV EDIT
|
Edit live environment as VAR=value lines |
ENV SAVE file |
Write environment snapshot |
ENV LOAD file |
Replace whole environment from file |
ENV RELOAD [file] |
Re-read last ENV SAVE/LOAD file, or specified file |
ENV RESET |
Restore startup environment |
There is no environment UNDO. Invalid files/editor results leave %ENV
unchanged. Values never undergo shell expansion. See
Environment and shell for file syntax and examples.
| Input | Result |
|---|---|
! command |
Run system shell; screen mode captures output with closed stdin |
!! command |
Lend the terminal to an interactive external command |
chdir '/path' |
Ordinary Perl: change this session's working directory |
HELP |
Complete built-in reference; pauses by screenful in screen mode |
CD [directory] / CHDIR [directory]
|
Change AnteREPL's working directory; no argument uses the home directory |
QUIT / EXIT
|
Exit if source saved, or refuse with an explanation |
QUIT! / EXIT!
|
Exit and discard unsaved source |
Q / Q!
|
Ask to quit / quit without asking, including in plain mode |
| Ctrl-D | End AUTO and cancel unfinished input; otherwise exit if source saved |
Interactive exits print Thank, we hope something good happens to you today!
on its own line. Screen mode first restores the original terminal display and
default cursor style. Batch output omits the farewell.
! cd changes only the child shell. Use %ENV or ENV SET for environment
changes that future child commands should inherit.
Startup flags are listed in Installation. Screen navigation and LIST pause keys are in Editing and screen.