in reply to Deleteing array elements
otherwise I'm not sure if you can avoid an (implicit) loop.@arr = @arr[0,1,3];
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Deleting array elements
by davorg (Chancellor) on Jul 23, 2009 at 08:26 UTC | |
by si_lence (Deacon) on Jul 23, 2009 at 08:55 UTC |