Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Compare 2 CSV files by two different column and printout

by Laurent_R (Vicar)
on Oct 01, 2013 at 11:07 UTC ( #1056465=note: print w/ replies, xml ) Need Help??


in reply to Compare 2 CSV files by two different column and printout

Looking at the first line of each of your file, your machine has the form "aagdbp01.mydomain.it" and your hostname the form "aagdbp01". It seems that hostname =~ m/machine/ is never going to match. So your are done with your work, the output file should simply be file1.

Or perhaps you want something like this: $machine =~ m/$hostname/. BTW, the full truth is that hostname =~ m/machine/ will actually never be executed, because (besides the defective syntax)  (string1 OR string2) =~ m/subsytem/ will probably always be false for basically the same reason (if I can make sense of your data).


Comment on Re: Compare 2 CSV files by two different column and printout
Select or Download Code
Re^2: Compare 2 CSV files by two different column and printout
by nicopelle (Initiate) on Oct 01, 2013 at 11:55 UTC
    Of course your right. My mistake reporting the matching. The right case is:
    $machine =~ m/$hostname/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-07-30 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls