while (){ my $line =$_; #process data in here }