Subject: | func doesn't work in RHS of s///e |
% cat try.pl
use warnings;
use strict;
use Method::Signatures::Simple;
s/^/ func ($x) { $x } /e;
% perl try.pl
Global symbol "$x" requires explicit package name at try.pl line 6.
Type of arg 1 to main::func must be block or sub {} (not scalar dereference) at try.pl line 6, near "$x) "
syntax error at try.pl line 6, near ") {"
Global symbol "$x" requires explicit package name at try.pl line 6.
Execution of try.pl aborted due to compilation errors.