if ( -s file ){ while() { my($line) = $_; chomp($line); print FILE2 "$line\n"; print FILE2 "you need to do this\n"; print FILE " \n"; } } else { print FILE2 "There is nothing to do\n"; }