Try:
foreach $field (split(/\Q$delim\E/, $line)) {

Update: See perldoc -q quote

Cheers,
Darren :)

PS. The word is "delimiter" ;)


In reply to Re: Split - what am i doing wrong? by McDarren
in thread Split - what am i doing wrong? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":