in reply to Problem with split using a | seperator

split's argument is a regexp pattern. "|" is special in regexp patterns.
split(/\|/, $record );

Wouldn't hurt to use Text::CSV_XS...

Replies are listed 'Best First'.
Re^2: Problem with split using a | seperator
by Grey Fox (Chaplain) on Jan 23, 2009 at 16:48 UTC
    Thanks;

    It's good to know that the split argument is a regex pattern. I changed it and it works great.

    -- Grey Fox
    "We are grey. We stand between the darkness and the light" B5
      There's also quotemeta, as in: split quotemeta '|', $record;