Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

by Laurent_R (Canon)
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 "" 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).

Replies are listed 'Best First'.
Re^2: Compare 2 CSV files by two different column and printout
by nicopelle (Novice) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056465]
[Corion]: Also suffering is my 2-factor Github sign-in, as now, FF can't read my USB token anymore. "This was a horrible idea" is slowly dawning on me ;)
[Corion]: Yay. FF now has u2f built-in (behind an about:config setting), so using an USB token to sign in actually works :)
[Corion]: So, it's not all bad with the new FF :)
[holli]: 2factor is a bit too much for me. i just use passwords like jhbn8789q27312laks dmaw98^
[moritz]: isn't there also some about:config setting to enable the old plugin API?
[Discipulus]: indeed, only the logo is nicer

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2017-11-20 20:19 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (293 votes). Check out past polls.