# entweder $test2 = sub { print $var."\n" } # oder sub test2 { my $var = shift; print $var."\n"; }