This was an extremely simplified example to try and get to the core problem. In reality this is an array of arrays inside a hash. I'm looping through doing some processing and certain things should only be processed once but others should be processed multiple times. My solution was to remove them from the array after processing if they were to only be processed once.
After looking at all the great responses here I think @array = grep $_ != 5, @array;
is what I want. The 5 would actually be an array reference, but I think this will work.
Thanks for all the help,
"So... What do all these little arrows mean?"