[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: Benchmarking (was: Re: [MacPerl] crazy hoops to do something that seems so simple?)



At 12:47 -0500 2000.11.15, Scott R. Godin wrote:
>ahhhhhhh ok.. so um.. why is there no \ reference to the sub then?
>
>such as my $trans = \&sub whatever {#content};
>
>is that implicit in the eval?

Two primary ways to create a reference to a function:

1. Anonymous sub:

    $ref = sub { ... };

2. Named sub:

    $ref = \&somesub;

Ronald chose the first one, since there was no named sub to create a
reference to, as in the second one.

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org