The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
12345678910111213141516 #!perluse strict;use warnings FATAL => 'all';use Test::More;use Function::Parameters;my $fun = fun ($x, $y) { $x * $y };is($fun->(3, 4), 12);my $fun2 = fun ($z, $w = 10) { $z / $w };is($fun2->(60), 6);done_testing;
#!perl
use
strict;
warnings
FATAL
=>
'all'
;
Test::More;
Function::Parameters;
my
$fun
= fun (
$x
,
$y
) {
*
};
is(
->(3, 4), 12);
$fun2
$z
$w
= 10) {
/
->(60), 6);
done_testing;