@arr = grep { $_ !~ /c/ } @arr;
That works, of course, with the sample data that we've been given, but in the general case it will remove any element that contains the letter 'c'.
Regular expressions aren't always the answer. Sometimes a simpler approach is right.
@arr = grep { $_ ne 'c' } @arr;
In reply to Re^2: Deleting array elements
by davorg
in thread Deleteing array elements
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |