[Israel.pm] function prototypes

Levenglick Dov dov at freescale.com
Tue Jun 10 21:15:39 PDT 2008

Without verifying this theory with code (too early in the morning ;)),
my guess would be that perl is not interpreting this as being a
subroutine. Perhaps adding pretences would help: i.e.

Best Regards,
Dov Levenglick
The information contained in this email is classified as:
[ ] Freescale General Business Information
[x] Freescale Internal Use Only
[ ] Freescale Confidential Proprietary
-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Shmuel Fomberg
Sent: Tuesday, June 10, 2008 23:26
To: Perl in Israel
Subject: [Israel.pm] function prototypes

Hi All.

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

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

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

Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list