develooper Front page | perl.perl5.porters | Postings from April 2019

[perl #133969] REPL

Thread Next
Steven Penny
April 3, 2019 20:13
[perl #133969] REPL
Message ID:
# New Ticket Created by  Steven Penny 
# Please include the string:  [perl #133969]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Perl 5 currently does not have a REPL that I am aware of:–eval–print_loop

Several other languages offer this, such as:

- Python
- Ruby
- Julia
- Tcl

I found some workaround, but none of them are ideal. Can use perldebug:

    perl -d -e 0

but it requires manual printing. Can use eval:

    perl -E 'while (<STDIN>) {say eval}'

but it fails with pragmas:

Can use Devel::REPL, but it fails with standard input:

    $ echo 2+3 |
    $ echo 2+3 | -
    $ echo 2+3 | /dev/stdin

Can use "Reply", but no multiline support:

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About