in reply to splice help - deleting specific element

I think what you want is
@allcompanies = grep {!/^$co$/} @allcompanies;
Note that this is really no different than what you suggest (ie cycling), but it does, in fact, read much better...

Replies are listed 'Best First'.
Re^2: splice help - deleting specific element
by ikegami (Patriarch) on Oct 17, 2008 at 16:50 UTC
    Using the match operator to compare strings exactly is overkill, and you got it wrong. I don't think many companies use regexp patterns for names.
    @allcompanies = grep {!/^\Q$co\E$/} @allcompanies;