in reply to Yet More fun With Array Indices
my @array = qw/1 2 3 4 5 6 7 8 9 10 11 12/; my $pattern = qr/2/; @array = grep { ! /$pattern/ } @array; # @array now contains qw/1 3 4 5 6 7 8 9 10 11/
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Yet More fun With Array Indices
by Aristotle (Chancellor) on Sep 14, 2002 at 17:01 UTC | |
|
Re: Re: Yet More fun With Array Indices
by graff (Chancellor) on Sep 15, 2002 at 03:34 UTC | |
|
Re: Re: Yet More fun With Array Indices
by Elgon (Curate) on Sep 14, 2002 at 18:51 UTC |