# Input string is "ab''c" and ' is the delimiter for split. # After "ab" there are two delimiters, hence split returns # an array with 3 elements as show in the output below. # But I want output to have 4 elements instead of 3. One # empty array element for every delimiter split encounters my @arr1 = split("'", "ab''c"); print Dumper(@arr1); Output: $VAR1 = 'ab'; $VAR2 = ''; $VAR3 = 'c'; I want the output to be $VAR1 = 'ab'; $VAR2 = ''; $VAR3 = ''; $VAR4 = 'c';