@cols = split(/|/, $line);
with
@cols = split('|', $line);
will also do the trick.
In reply to Re: using split by girarde in thread using split by maurkb