Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Assist in understanding old code

by tirwhan (Abbot)
on Feb 28, 2005 at 23:52 UTC ( [id://435236]=note: print w/replies, xml ) Need Help??


in reply to Assist in understanding old code

osunderdog has already explained what the code does. The reason you are getting the warning is that the code starts to fill the array at index 1:
for(my $bn=1;$bn<=$row[0];$bn++)
but starts to retrieve and sort at index 0
@indexUlt=sort{$nxxult[$a]<=>$nxxult[$b]} 0 ... $#nxxult;
Thus, you have an undef value in your comparison at nxxult[0] and you get a warning. Either change the loop to start filling the array at $nxxult[0] or count from 1 ... $#nxxult.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-29 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found