- or download this
my $sep_re = quotemeta($sep);
my @fields = split(/$sep_re/, $_);
- or download this
my @fields = split(/\Q$sep/, $_);
- or download this
$\ = "\n";
$, = ";";
...
print @fields;
print '';
}
- or download this
a,b,c
a;b;c
...
a|b|c
a;b;c
- or download this
$\ = "\n";
$, = ";";
for my $sep ('\t', "\t") {
print split(/\Q$sep/, "foo\tbar\\tbaz");
}
- or download this
foo bar;baz
foo;bar\tbaz