Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Get unique fields from fileby choroba (Cardinal) |
on Jan 06, 2022 at 12:00 UTC ( [id://11140218]=note: print w/replies, xml ) | Need Help?? |
The first argument of split is a regex, not a string. "|" is an alternative of two empty strings.
If you want to split on the literal vertical bar, you need to backslash it.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|