Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Merge the difference between two files

by NetWallah (Canon)
on Jun 17, 2017 at 04:53 UTC ( [id://1193006]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Merge the difference between two files
in thread Merge the difference between two files

To achieve this, after the line
$currentheader = $line;
add this:
if (exists $result{$currentheader}){ $currentheader="RECYCLE_BIN"; }
I will leave it as an exercise for you to figure hou how to avoid printing the "RECYCLE_BIN" item.

                Once it hits the fan, the only rational choice is to sweep it up, package it, and sell it as fertilizer.

Replies are listed 'Best First'.
Re^4: Merge the difference between two files
by hopper (Novice) on Jun 22, 2017 at 21:12 UTC

    I was able to print the unmatched contents to a file. could you please help me edit the code to do just compare the content of the line "NAME" and print out the header of the file A. Don't compare the headers. I tried to figure out but so far I have no luck. Thanks so much in advance

      Your second and third sentences contradict each other:
      * edit the code to do just compare the content of the line "NAME" * Don't compare the headers
      So I'm having trouble understanding what you want.

      Sample data, and expected results would help.

                      Once it hits the fan, the only rational choice is to sweep it up, package it, and sell it as fertilizer.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-19 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found