Here I am trying to filter only the elements that do not have a substring world and store the results back to the same array. What is the correct way to do this
world
Use grep
grep
@no_world_for_tomorrow = grep { !/world/ } @feathers;
For details, perldoc -f grep.
perldoc -f grep