my @data; while( ) { /active/ and push @data, $_; }