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

Re: [MacPerl] Re: Benchmarking



on 11/14/2000 10:37 PM, Bruce Van Allen at bva@cruzio.com wrote:

> At 9:46 PM 11/14/00, Scott R. Godin wrote:
>> on 11/14/2000 03:20 PM, Ronald J Kimball at rjk@linguist.dartmouth.edu
>> wrote:
>>> [snip]
>>> The difference between using s/// and tr/// is actually rather significant.
>> 
>> Is it possible to write the
>> 
>> s/([a-z0-9])/$replace{$1}/g;
>> 
>> in a tr/// form? It's my understanding at this point (and I could be wrong)
>> that you have to write it as an eval, but I don't know whether you can
>> assign the result of that to a variable, using =~ .. anyone know?
> 
> I've lost the reason you're not using reverse. It seems to me that in
> your original post, it didn't work because you had the construct
> $this =~ reverse $that;
> which doesn't work because you used the binding operator. The
> solution was to say
> $this = reverse $that;


because reverse simply will not do what I need it to do under the context
I'm using it. 

Perhaps a clearer demonstration is in order..

download the zip archive at
    <http://216.155.0.50/~sgodin/misc/ncmapslist.zip>

You can view the ncmapslist.cgi in a browser with the input_files folder
containing maps_list.txt in the same directory as the cgi, or see the
working copy at 
    <http://216.155.0.50/~sgodin/cgi-scripts/ncrp/ncmapslist.cgi>
for reference purposes.

MacPerl cgi's choke on the output of the data however, as the size of this
file seems to be too large for the built-in websharing control panel to
handle (but only for the utdm section.. the rest work fine) (if anyone knows
a fix or workaround for this, I'd be enormously grateful). ((and yes, I've
tried increasing the memory partition of the cgi to over 150MB without
success. argh.)) 

By doing this in advance, I can sort the output list the *same way* (neat
trick, that) whether I am sorting by rating & map title or sorting by map
title only, thus obviating the need for multiple blocks of code or custom
sort routines -- simply by transforming the data to sort into a more
specialized format. You'll see how it works... It's a very nice trick :>

....but simply taking the reverse of $coercename wouldn't work at all. I
don't need it backwards, I need every letter transformed into its
alphanumeric opposite, but kept in the same order.


...and now for something completely different.  (: bwahahahhahah!

-- 
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