Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: join - join two files according to a common key

by Anonymous Monk
on Mar 12, 2018 at 16:09 UTC ( #1210734=note: print w/replies, xml ) Need Help??


in reply to join - join two files according to a common key

So, using your code above, I ran
./join.pl --delimiter , --on 1 --missing 1 --missing 2 --warn-on-dupli +cates 1 --warn-on-duplicates 2 --progress usa_ldap.csv HPSMcmdb.csv
In the case where the key was missing in file 1, there is no key output for the line. I guess what would work for my data is if the key from the right file were output in the left key column (which for me is column 1). I am looking into the code to figure out how to code that specific special case - but if anyone already has a solution, I would really appreciate it. Thank you

Replies are listed 'Best First'.
Re^2: join - join two files according to a common key
by Anonymous Monk on Mar 12, 2018 at 16:11 UTC
    When I wrote In the case where the key was missing in file 1 it might be better worded "when there is a line with a key in file 2 that does not have a corresponding line in file 1".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1210734]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2018-06-18 23:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (111 votes). Check out past polls.

    Notices?