Subject: | func doesn't work in ${...} in strings |
% cat try.pl
use warnings;
use strict;
use Method::Signatures::Simple;
print "${\func ($x) { $x }\n";
% 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.
syntax error at try.pl line 6, at EOF
Execution of try.pl aborted due to compilation errors.