in reply to Deleteing array elements
If you know the index of the element you want to delete you can use a slice
One possibility would be a grep
otherwise I'm not sure if you can avoid an (implicit) loop.@arr = @arr[0,1,3];
One possibility would be a grep
Why do you want to avoid a loop? Are there so many elements in the array? Maybe you could avoid putting the unwanted elements in the array in the first place.@arr = grep { $_ !~ /c/ } @arr;
cheers, si_lence
In Section
Seekers of Perl Wisdom