![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Get unique fields from fileby choroba (Archbishop) |
on Jan 06, 2022 at 12:00 UTC ( #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
|
|