and use it as in t.pl:--- - - 1 - sub { print "one" }
but...use YAML; my $s = YAML::LoadFile( "t.yml" ); my $f = $s->[ 0 ]->[ 1 ]; $f->();
Any advice to make this work? Thanks.perl t.pl Undefined subroutine &main::sub { print "one" } called at t.pl line 10 +.
In reply to code reference in YAML by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |