|There's more than one way to do things|
Interactive Perl Interpreterby tomazos (Deacon)
|on Oct 11, 2005 at 08:38 UTC||Need Help??|
tomazos has asked for the wisdom of the Perl Monks concerning the following question:
I've been required to learn a non-Perl Perl-like language at work to integrate a system written in it with a Perl system.
One thing I noticed is the interactive-mode of its interpreter. I think it borrowed this idea from the functional languages that it seems to have a lot of features from.
In short you get a shell-like prompt ">>> " where you can enter an expression or statement. It then evaluates it and returns a human-readable version of its value.
It also stores previous declarations and values in the current environment. For Perl it might look something like this:
I think we have stuff like this already. eg perl -e. The perl debugger. I've also seen here, people rolling there own 20 line scripts to do something similiar.
My question is what is in your opinion, the best way to setup an Interactive Perl Interpreter, and what are the options for pre-rolled ones (eg from CPAN or elsewhere)?