Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks. R.while (<FILE>){ my @arr_hold=$_; foreach my $guide (@arr_hold){ if ( $guide =~ /PAGE: 2/){ $var = 1; } if ($var == "1"){ print FILE2 "$guide"; push (@new_arr,$guide); } } foreach (@new_arr){ print $_; } }
Edit Masem 2002-01-23 - Title modified from "newbie question"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: newbie question
by VSarkiss (Monsignor) on Jan 23, 2002 at 04:21 UTC | |
|
Re: newbie question
by Flame (Deacon) on Jan 23, 2002 at 04:26 UTC | |
|
Re: newbie question
by indapa (Monk) on Jan 23, 2002 at 04:22 UTC | |
|
dividing a file in to two parts based on some regexp
by jarich (Curate) on Jan 23, 2002 at 07:15 UTC |