open FH, "hoge.txt";
while(<FH>) {
  if(/ *foo */) {
    print;
  }
}