Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'my $x = sub { say "@_" }; $x->("fred")'
    fred
    
  2. 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.
    
  3. or download this
    $ perl -E 'my $x = sub { say "@_" }; "XYZ"->$x("fred")'
    XYZ fred