Hi All,
I have too version of a routine that iterates through
about 140 elements of an array. I am trying to make
the script as efficient as possible (obviously), and I
have 2 versions of a routine that does a bitwise
comparison to match a filter. Can anyone tell me just
by looking which is likely to be fater? My guess is
the map version:
1. loop version:
for (@image_list) {
( int( $filter ) & int( $image_data{$_}[2] ) ) ==
$filter and push @match, $_;
}
2. Map version:
@match = map { ( int( $filter ) & int(
$image_data{$_}[2] ) ) == $filter and $_ or () }
@image_list;
Any thoughts much appreciated.
BTW, can anyone tell me why saying 'use integer' kills
the operation of 'localtime'?
TIA,
Richard
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music
Charts
http://uk.my.yahoo.com