How do I remove duplicate characters and keep the unique one only in Perl?

前端 未结 11 745
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 16:08

How do I remove duplicate characters and keep the unique one only. For example, my input is:

EFUAHUU
UUUEUUUUH
UJUJHHACDEFUCU

Expected out

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 16:34

    for a file containing the data you list named foo.txt

    python -c "print set(open('foo.txt').read())"
    

提交回复
热议问题