in reply to Re: everyauction script error bidding errors
in thread everyauction script error bidding errors

Is this section the problem because what it is im trying to do is;
my ($alias, $email, $bid, $time, $add1, $add2, $add3) = &read_bid($bid +s[0]);
This section reads bid number 0 which in my case is the seller in my .dat files so bid 1 would be the first bidder. I need the script to read each individual bid however many there may be i.e 1 to 22 and pick out if the member who is logged in as form{'ALIAS'} has placed a bid which has been outbid. By using this code i can manualy enter the bidders bid in order however this is no good i need somthing to automatically do this;
my ($alias, $email, $bid, $time, $add1, $add2, $add3) = &read_bid($bid +s[1]); ----- what ever number the bidder is
which i thought this section did;
for (my $i = $#bids; $i > 1; $i = 1) { my ($alias, $email, $bid, $time, $add1, $add2, $add3) = &read_b +id($bids[$i]); $time = sort ({ int $a <=> int $b } $time);

Replies are listed 'Best First'.
Re^3: everyauction script error bidding errors
by mkmcconn (Chaplain) on Jun 21, 2005 at 22:08 UTC

    Try ...

    if (@bids > 1){ for my $bid (1..$#bids){ my ($alias, $email, $bid, $time, $add1, $add2, $add3) = read_bid($ +bids[$bid]); } }

    As noted elsewhere, your sort on a scalar will not do what you are trying to do, since sort() works on a LIST.
    mkmcconn
    edit: fix artifacts in code copied from elsewhere.