I have a signal file with each line beginning with 0 or 1.
If I have 1 followed by 0 in the next line, then I need to process the 0 signal line.
>#Sample File
>0
>0
>1
>0 (process line)
>0
>1
>0 (process line)
my code
OUTER : while (<F>) {
if($_=~/1/){
my $a = <F>
process_line($a) if ($a=~/0/);
next OUTER if ($a=~/1/);
}
The file is huge, so I don't want to slurp.