one way:
sort { $a +0  <=> $b + 0 } @msgs

forces them to be treated as numbers, not strings.   Hmm:
@msglist = sort { $a <=> $b } @msgs;

$found = $msglist[0];
for ($i = 0; $i < scalar(@msglist); ++$i) {
    print "Checking message $msgs[$i]\n";
    last if ($msglist[$i] == $message);
}
$found = $msglist[$i-1] if ($i);

print "Previous: $found\n";

Try:
@msglist = sort { $a <=> $b } @msgs;

$found = $msglist[0];
for my $msgid (@msglist) {
    print "Checking message $msgid\n";
    last if ($msgid == $message);
    $found = $msgid; 
}

print "Previous: $found\n";

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5030

We are REDACTED!!!
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to