Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Get unique fields from file

by kcott (Archbishop)
on Jan 07, 2022 at 03:11 UTC ( #11140231=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat pm_11140211_flatfile.dat
    head1|head2|head3
    ...
    val6|val4|val5
    val2|val7|val5
    val3|val7|val3
    
  2. or download this
    $ perl -e '
        use Data::Dump;
    ...
        dd \%z;
    '
    { a => 1, b => 2, c => 3, d => 4 }
    
  3. or download this
    #!/usr/bin/env perl
    
    ...
    }
    
    print "$_: ", join(', ', sort keys %{$data{$_}}), "\n" for sort @cols;
    
  4. or download this
    head1: val1, val2, val3, val6
    head2: val2, val4, val7
    head3: val3, val5
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-08-18 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?