note
choroba
The first argument of [doc://split] is a <b>regex</b>, not a string. "|" is an alternative of two empty strings.
<c>
my @fields = split "|", 'abc|def';
print join ', ', @fields; # a, b, c, |, d, e, f
</c>
If you want to split on the literal vertical bar, you need to backslash it.
<c>
my @fields = split /\|/, 'abc|def';
print join ', ', @fields; # abc, def
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-832495">
<c>map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]</c>
</div></div><!-- Wiki2Monks {"version":1.161} -->
11140211
11140211