in reply to Split Help

Could it be that $variable contains text and not a regexp pattern? Fix:
my $sep_re = quotemeta($sep); my @fields = split(/$sep_re/, $_);
or
my @fields = split(/\Q$sep/, $_);

For example,

$\ = "\n"; $, = ";"; for my $sep (",", "\t", "|") { my $line = join($sep, qw( a b c )); print $line; my @fields = split(/\Q$sep/, $line); print @fields; print ''; }
a,b,c a;b;c a b c a;b;c a|b|c a;b;c

Or maybe you are trying to split on the two characters "\" and "t" instead of an actual tab character?

$\ = "\n"; $, = ";"; for my $sep ('\t', "\t") { print split(/\Q$sep/, "foo\tbar\\tbaz"); }
foo bar;baz foo;bar\tbaz