Perl - Check if contents of one file exist in another and print to output file explaination in descr

Posted by golwalkar.rohan on Stack Overflow See other posts from Stack Overflow or by golwalkar.rohan
Published on 2010-04-26T22:23:12Z Indexed on 2010/04/26 22:23 UTC
Read the original article Hit count: 256

Filed under:
|
|

Requirement:-

File1 has contents like - ABCD00000001,\some\some1\ABCD00000001,Y,,5 (this indicates there are 5 file in total in unit)

File2 has contents as ABCD00000001

So what i need to do is check if ABCD00000001 from File2 exist in File1 - if yes{ print the output to Output.txt till it finds another ',Y,,X'} else{ No keep checking}

Anyone? Any help is greatly appreciated.

© Stack Overflow or respective owner

Related posts about perl

Related posts about compare