Repository navigation
First session
Start anterepl. There is no READY> prompt. Type on the blank row below
the banner. The examples below show input separately from output.
Type:
say "hello";It prints hello. Quote strings as you would in a Perl script: say hi is
not a shortcut for say "hi".
Enter these four lines:
AUTO
say "hi"
say "there!"
AUTO OFF
The two Perl statements are stored quietly, with numbers assigned internally.
They have not run yet. Use AUTO ECHO ON if you want numbered copies printed
after each entry. AUTO OFF returns you to immediate execution. Ctrl-C or Ctrl-D
while entering text also ends AUTO and keeps the completed stored lines.
Type LIST. The listing is:
5 say "hi";
10 say "there!";The numbers are left-aligned, with spaces on their right so the code lines start together. Missing statement semicolons were supplied when stored.
Type RUN. Output:
hi
there!
Type:
10 say "again!"This replaces line 10. RUN now prints hi followed by again!.
You can also type LIST, move up into its line 10 using the arrow keys,
change the text there, and press Enter. That submits the edited row to the
program. Moving or typing on the screen alone does not change stored source.
7 say "in between"RUN executes lines 5, 7, and 10 in numeric order. The numbers are editing
addresses, not BASIC jump labels. Type 7 alone to delete that line; UNDO
restores it.
SAVE hello.bperl
QUIT
The REPL restores the terminal and prints:
Thank, we hope something good happens to you today!
Next time:
anterepl hello.bperlLoading does not run the program. Type RUN when ready.
Prefer a regular Perl file? Use SAVE hello.pl. It saves the current source
without editing numbers. To create a file with AnteREPL's default pragmas,
use EXPORT hello.pl; then perl hello.pl can run this example independently.
Type EDIT. Save and close the editor when done. Changed source is reloaded
into memory and numbered 10, 20, 30, ... . Type RUN to try it, and SAVE to
write it back to the program file. UNDO can reverse the complete editor edit.
Continue with Editing and screen controls or Files and EDIT.