if( FALSE !== preg_match($pattern, $f)) {
       preg_match($pattern, $f, $flist);
    }
ここをコメントアウトして、while内でprint