If you really want to learn Perl, you must install the read-eval-print loop (REPL) utility. If you have never used this utility, I will have serious grounds to doubt your Perl skills. Unlike Ruby or Python (or most other modern high-level programming languages), Perl does not come with an interactive REPL shell, which makes no sense at all, since, due to Perl's obscure syntax, someone trying out Perl would benefit at…
You can also go into the debug shell (which is REPL) by giving it some valid statement: Here is an example: shell> perl -de 1 This will take you into the perl debug shell (after evaluating the string "1" which is true).
$ my $x = sub { my $x = shift; return sub { $x . shift } }
$CODE1 = sub { # this is what is returned by Devel::REPL
package Devel::REPL::Plugin::Packages::DefaultScratchpad;
use warnings;
use strict 'refs';
my $x = shift @_;
return sub {
$x . shift(@_);
}
;
};
$ $x->('hello ')->('world');
hello world