Thanks guys,
Miller, I tried perl -n and it does the job but
BUt why perl -p is also printing non-matching lines ?
The following works but it also prints non-matching lines
perl -pe 'if ($_ =~ /^$/) {$_ = "This is a blank line \n" }' blank.dat
Output :
Hello
This is a blank line
Second...