Using a double quoted . the answer is first , second Using an escaped . the answer is first , second Using a double quoted, double escaped . the answer is first data1, second txt Using a single quoted . the answer is first , second Using a single quote escaped . the answer is first data1, second txt Using a single quote double escaped . the answer is first data1, second txt Using /./ in split the answer is first , second Using /\./ in split the answer is first data1, second txt Using /\\./ in split the answer is first data1.txt, second