Raw Input
  Line 1 data_1.1 data_1.2
       Line 2 data_2.1 data_2.2
    Line 3 data_3.1 data_3.2
Line 4
Desired Output
..Line 1 data_1.1 data_1.2
.......Line 2 data_2.1 data_2.2
....Line 3 data_3.1 data_3.2
Line 4
Script and Comments
Script1 [sed]
[ 1] s/^  *\n/&\n/
[ 2] :loop
[ 3] s/ \n/\n./
[ 4] t loop
Comments
  1. Step [1] will separate the leading spaces and the other characters of a line with a newline character.
  2. Step [2] thru [4] constitute a loop. In each iteration, it will
    • replace the space before the newline char with a dot.
    • move the newline character left for one character.
    till no leading spaces left.
Script2 [perl]
[ 1] s/^( +)/"." x length($1)/e