perl -i -lpe "s/^\s*$/<\/r>/g" test(filename i used to check separately)