John Edwards <[EMAIL PROTECTED]> wrote:
>Here's a solution I sent to the group earlier...

tnx, but I used simpler regexp since IP numbers which I use are already
verified as valid.
>For the array thing, have you considered using a hash instead?? How do you
>know where to insert the data in the array? Is it needed after another
>value, or at a certain element??

Array is a text file with lines as its elements. It looks like:

--txt file--
# ARIN: Aworldwidemall.com, VA - US
ALL:    63.64.190.230
# ARIN: Aworldwidemall.com, VA - US
ALL:    67.64.190.230
.
.
.
.
# ARIN: Aworldwidemall.com, VA - US
ALL:    163.64.190.230
--txt file--

Array is already sorted by IP, so I have to insert a new record
somewhere(i.e. 65.64.190.230 between 1st and 2nd record) and write a whole
array back to the file.


-- 
Matija

Reply via email to