in reply to Simple Array Followup
As for 'array manipulation', what kind of manipulation are you looking for? What is it what you want that splice doesn't do for you?my (@array, $keep); while (<$handle>) { if (!@array) {$keep = /FIRST_PATTERN/;} next unless $keep; # Next if we haven't seen the first pattern. push @array, $_; next unless $keep = !/SECOND_PATTERN/; # Next unless the second pattern is seen. process_array \@array; # Process and print print @array; @array = (); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simple Array Followup
by jriggs420 (Sexton) on Oct 27, 2005 at 16:56 UTC | |
by radiantmatrix (Parson) on Oct 28, 2005 at 14:59 UTC |