Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does perl have interactive shell? [duplicate]

Tags:

perl

Languages like Ruby, Python, Lua, PHP, Node.js, etc. have a simple "shell" where you can type simple one-liners and see the result. Does Perl has something similar? I'm not looking for something fancy that does pretty printing (I'll use print()) or accepts multiline input.

The story is this:

I need to experiment with some regexps. I know I can do perl -e "..." but then I need to shell-escape the code and this complicates matters. If I had a Perl shell I wouldn't need to worry about escaping.

like image 630
Niccolo M. Avatar asked Feb 26 '26 03:02

Niccolo M.


2 Answers

Have you ever tried Reply.pm? I'm using it.

https://metacpan.org/release/Reply

like image 151
ernix Avatar answered Feb 27 '26 18:02

ernix


Have a try with this CPAN module:

Perl::Shell

like image 31
Toto Avatar answered Feb 27 '26 17:02

Toto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!