- or download this
$ perl -E 'my $x = sub { say "@_" }; $x->("fred")'
fred
- or download this
$ perl -E 'my $x = sub { say "@_" }; $x("fred")'
syntax error at -e line 1, near "$x("
Execution of -e aborted due to compilation errors.
- or download this
$ perl -E 'my $x = sub { say "@_" }; "XYZ"->$x("fred")'
XYZ fred