Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: subset extraction from master file

by ptkdb (Monk)
on Nov 18, 2003 at 16:11 UTC ( [id://308017]=note: print w/replies, xml ) Need Help??


in reply to subset extraction from master file

So your desired threshold of someone doing your thinking/experimenting/debugging has not yet been crossed to your satisfaction?
mentioned in response to the remark of "previous suggestions didn't work"

Just tossing some pseudo code out there:

use strict ; use warnings ; my(%h, %h2, $f, $master, $newmaster, %db) ; while( <$f> ) { @h{@KEYS} = split ; $db{$h{KEYFIELD} = { %h } ; } while( <$master> ) { @h2{@KEYS} = split ; @h2{@OTHERKEYS} = @$db{$h2{KEYFIELD}}{@OTHERKEYS} if exists $db{$h2 +{KEYFIELD}} ; print $newmaster join ":", @h2{@ALLKEYS} ; } # move new master ontop of oldmaster

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-16 09:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found