Have a look on Text::Diff
I think it does exactly what you need.
"Brian Raven"
<[EMAIL PROTECTED] To:
<[email protected]>
m> cc:
Sent by: Subject: RE:
comparing contents of two files
[EMAIL PROTECTED]
eState.com
10.03.2006 12:21
Hawk <> wrote:
> Hi,
>
> I have two username/password files from two different systems. I
> need the script to output users that exist in both files to
> >>match.txt users that do not match, output to >>no_match.txt
>
> Users1.txt: (tab delimited)
>
> Abc 123
> Scsadffa adjeka*
> Etc...
>
>
> Users2.txt: (tab delimited)
>
> Abc 123
> 23daas kjiaoa
> Etc...
>
> Match.txt should contain:
>
> Abc 123 Abc 123
>
>
> * first set is from users1.txt and second set is from users2.txt
>
> No_match should contain:
>
> Scsadffa adjeka*
> 23daas kjiaoa
>
>
> Should be easy, but I can't get it work.... In short, does someone
> have a script already written?
Sounds a bit like a FAQ. See 'perldoc -q "difference of two arrays"'.
Perhaps also look at Algorithm::Diff.
HTH
--
Brian Raven
=================================
Atos Euronext Market Solutions Disclaimer
=================================
The information contained in this e-mail is confidential and solely for the
intended addressee(s). Unauthorised reproduction, disclosure, modification,
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender
immediately and delete it from your system. The views expressed in this
message do not necessarily reflect those of Atos Euronext Market Solutions.
L'information contenue dans cet e-mail est confidentielle et uniquement
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee.
Toute copie, publication ou diffusion de cet email est interdite. Si cet
e-mail vous parvient par erreur, nous vous prions de bien vouloir prevenir
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de
votre systeme. Le contenu de ce message electronique ne represente pas
necessairement la position ou le point de vue d'Atos Euronext Market
Solutions.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs