in reply to Re^3: identifying null fields in bar delimited records
in thread identifying null fields in bar delimited records
my $delim = qr/\|/; my $line = "a||c|\t| |d||e"; my @fields = split($delim, $line);
The qr operator quotes and compiles its STRING as a regular expression.
split splits on a pattern (regex).
update:
Added explanation.
|
|---|