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

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



on 11/15/2000 11:00 AM, Ronald J Kimball at rjk@linguist.dartmouth.edu
wrote:

>>> my $reverse = reverse '0' .. '9', 'a'..'z';
>>> my $trans = eval "sub { \$_[0] =~ tr/a-z0-9/$reverse/ }";
>> 
>> It wouldn't have occurred to me to put the reference where you did.. can you
>> give me a clue or two as to why it's done that way instead of referencing
>> the anonymous sub itself?
> 
> I'm not sure what you mean...  That does create a reference to an anonymous
> sub.
> 
> Or do you mean the backslash before $_[0]?  That's inside double quotes;
> the backslash escapes the dollar sign.  :)


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?

-- 
Scott R. Godin            | e-mail : mactech@webdragon.net
Laughing Dragon Services  |    web : http://www.webdragon.net/



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