Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Get unique fields from file

by kcott (Archbishop)
on Jan 07, 2022 at 03:11 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-18 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found