@arr = split /\|/; for (my $x = 0; $x < @arr; $x++) { $arr[$x] =~ s/\\n/\n/g; } $dbh->execute(@arr);