Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Get unique fields from file

by choroba (Cardinal)
on Jan 06, 2022 at 12:00 UTC ( [id://11140218]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @fields = split "|", 'abc|def';
    print join ', ', @fields;  # a, b, c, |, d, e, f
    
  2. or download this
    my @fields = split /\|/, 'abc|def';
    print join ', ', @fields;  # abc, def
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140218]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found