You need to shift() or pop() the array; delete is for hashes.
push = add item to end of array
pop = remove item from end
unshift = add item to beginning
shift = remove item from beginning _________________ Current Site (2008) http://www.cuvou.com/
Thanks,
I was also wondering if there was a way to find out what the highest 'number' of an array is, Not the highest content but how many individual bits of data are stored in it.
Beacuse what I am trying to do is get the attached sub to run through the array, send the message and then delete the data it has just sent. I am not sure if that make sense or not, but I am finding it kind of hard to explain.
Code:
sub emptyMessageArray{
my $i=@array;
while ($i ne 0){
my($to, $mirror,$message) = split(/-/, $messages[$i], 3);
print"To: $to\nMirror: $mirror\nMessage: $message\n\n\n";
$bot->{msn}->{$mirror}->call($to,"$message");
pop(@messages);
}
}
Since the code I posted in my original post I have changed the delete to pop, and modified the loop but I still cant get it to work.
Thanks _________________ "Help us, Help you" - BotDepot