in reply to Variable as split delimiter

Use qr to compile the expression first:

$delimiter = qr/\|/; ..... @line_parts = split $delimiter, $line;