Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: File handles in regular expressions

by Lotus1 (Curate)
on Oct 19, 2012 at 15:26 UTC ( #999957=note: print w/replies, xml ) Need Help??

in reply to Re: File handles in regular expressions
in thread File handles in regular expressions

Your solution only matches if the line at the same line number in both files is the same. The OP was attempting to match each line in file1 against each line in file2. For the files listed below only the first line is matched even though there are four lines that match.

File1.txt: item1 item2 item3 item4 File2.txt: item1 abc item2 item3 item4 File3.txt: item1

Replies are listed 'Best First'.
Re^3: File handles in regular expressions
by Kenosis (Priest) on Oct 19, 2012 at 16:15 UTC

    Wow! I certainly misunderstood the OP. Will strike/revise this. Thank you for pointing this out.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2018-01-24 04:49 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (255 votes). Check out past polls.