[Israel.pm] function prototypes

Shmuel Fomberg semuelf at 012.net.il
Tue Jun 10 13:25:59 PDT 2008


Hi All.

I'm trying to write a function:
sub MetaField ($&) { ... }

and call it like that:
MetaField("data", { $_->ctx->{length} })
or:
MetaField("data", $_->ctx->{length})

but only this works:
MetaField("data", sub { $_->ctx->{length} })

Why?
Shmuel.



More information about the Perl mailing list