{ 2 * $^x } # or -> $x { 2 * $x } # or sub ($x) { 2 * $x } # or sub { 2 * $_[0] } #### $sub(3); # or $sub.(3); # All except the last one can also be called using: $sub(x => 3); # or $sub.(x => 3);