_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0394833663==--
RE: How to compare two files and update to second file
am 26.02.2007 13:55:56 von Brian Raven
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Beri
Veera-ext, Reddy
Sent: 26 February 2007 12:32
To: ActivePerl
Subject: How to compare two files and update to second file
> Hi,
> I have to compare files, If second file is not have correct date I
should update second file. Please provide > a sample for this problem.
You haven't given use enough information to even guess what your real
problem is. This link may help:
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 immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =
Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.
L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.
Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:04:56 von Reddy.Beri-Veera-ext
Hi,
I am using Perl. =
I have to compare INPUT text file and OUTPUT text file.
If OUTPUT file is not have some text which is there in INPUT file. I need
to write that text to OUTPUT file. =
Ex:
INPUT file has (CADITEM, BSHITEM, ToolItem )
OUTPUT file has (CADITEM, ToolItem) =
I need to compare to files and write BSHITEM to OUTPUT file.
My problem: I am not able read two file at same time. I am getting only from
one file.
Please help me how to read two files and compare.
Thanks and Regards
Karunakara Reddy
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Brian
Raven
Sent: 26 February 2007 13:56
To: ActivePerl
Subject: RE: How to compare two files and update to second file
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Beri
Veera-ext, Reddy
Sent: 26 February 2007 12:32
To: ActivePerl
Subject: How to compare two files and update to second file
> Hi,
> I have to compare files, If second file is not have correct date I
should update second file. Please provide > a sample for this problem.
You haven't given use enough information to even guess what your real
problem is. This link may help:
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.
Atos Euronext Market Solutions Limited - Registered in England & Wales with
registration no. 3962327. Registered office address at 25 Bank Street
London E14 5NQ United Kingdom. =
Atos Euronext Market Solutions SAS - Registered in France with registration
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 75009
Paris France.
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.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e
au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se situe 25=
Bank
Street E14 5NQ Londres Royaume Uni.
Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e,
enregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro =
425 100
294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Haussmann 75=
009
Paris France.
==================== =====3D=
================
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
This is a test
am 26.02.2007 16:07:31 von Administrador Intranet Internet
This is a test ...
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:07:54 von eroode
Why compare? Why not just copy the input to the output each time?
Eric
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Beri
Veera-ext, Reddy
Sent: Monday, February 26, 2007 10:05 AM
To: Brian Raven; ActivePerl
Subject: RE: How to compare two files and update to second file
Hi,
I am using Perl.
I have to compare INPUT text file and OUTPUT text file.
If OUTPUT file is not have some text which is there in INPUT file. I
need to write that text to OUTPUT file.
Ex:
INPUT file has (CADITEM, BSHITEM, ToolItem ) OUTPUT file has (CADITEM,
ToolItem)
I need to compare to files and write BSHITEM to OUTPUT file.
My problem: I am not able read two file at same time. I am getting only
from one file.
Please help me how to read two files and compare.
Thanks and Regards
Karunakara Reddy
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:14:43 von Reddy.Beri-Veera-ext
Hi,
Thanks for your information. Output file has some additional data.
OUTPUT file should have INPUT FILE data but INPUT file need be have all
data of OUTPUT.
Thanks and Regards
Reddy
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Roode,
Eric
Sent: 26 February 2007 16:08
To: ActivePerl
Subject: RE: How to compare two files and update to second file
Why compare? Why not just copy the input to the output each time?
Eric
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Beri
Veera-ext, Reddy
Sent: Monday, February 26, 2007 10:05 AM
To: Brian Raven; ActivePerl
Subject: RE: How to compare two files and update to second file
Hi,
I am using Perl.
I have to compare INPUT text file and OUTPUT text file.
If OUTPUT file is not have some text which is there in INPUT file. I
need to write that text to OUTPUT file.
Ex:
INPUT file has (CADITEM, BSHITEM, ToolItem ) OUTPUT file has (CADITEM,
ToolItem)
I need to compare to files and write BSHITEM to OUTPUT file.
My problem: I am not able read two file at same time. I am getting only
from one file.
Please help me how to read two files and compare.
Thanks and Regards
Karunakara Reddy
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:17:28 von Brian Raven
Beri Veera-ext, Reddy wrote:
> Hi,
> I am using Perl.
> I have to compare INPUT text file and OUTPUT text file.
> If OUTPUT file is not have some text which is there in INPUT file.
> I need to write that text to OUTPUT file. Ex:
> INPUT file has (CADITEM, BSHITEM, ToolItem ) OUTPUT file has
> (CADITEM, ToolItem) I need to compare to files and write BSHITEM to
> OUTPUT file. =
Given the limited information provided so far, simply copying the first
file over the top of the second would seem to do the trick. No need to
compare files at all.
> My problem: I am not able read two file at same time. I am getting
> only from one file. =
I don't understand. What is stopping you from reading two files at the
same time? It seems fairly straightforward.
> =
> Please help me how to read two files and compare.
You are still a bit short on useful information. Please provide a short,
working example that demonstrates your problem, and what you have tried
so far. So that would be two short input data files and the resulting
output file, and one short Perl script that we can cut and paste, and
execute for ourselves, if we are so inclined. With emphasis on short.
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 immediat=
ely and delete it from your system. The views expressed in this message do =
not necessarily reflect those of Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited - Registered in England & Wales with=
registration no. 3962327. Registered office address at 25 Bank Street Lon=
don E14 5NQ United Kingdom. =
Atos Euronext Market Solutions SAS - Registered in France with registration=
no. 425 100 294. Registered office address at 6/8 Boulevard Haussmann 750=
09 Paris France.
L'information contenue dans cet e-mail est confidentielle et uniquement des=
tinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Tou=
te copie, publication ou diffusion de cet email est interdite. Si cet e-mai=
l vous parvient par erreur, nous vous prions de bien vouloir prevenir l'exp=
editeur immediatement et d'effacer le e-mail et annexes jointes de votre sy=
steme. Le contenu de ce message electronique ne represente pas necessaireme=
nt la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Soci=E9t=E9 de droit anglais, enregi=
str=E9e au Royaume Uni sous le num=E9ro 3962327, dont le si=E8ge social se =
situe 25 Bank Street E14 5NQ Londres Royaume Uni.
Atos Euronext Market Solutions SAS, soci=E9t=E9 par actions simplifi=E9e, e=
nregistr=E9 au registre dui commerce et des soci=E9t=E9s sous le num=E9ro 4=
25 100 294 RCS Paris et dont le si=E8ge social se situe 6/8 Boulevard Hauss=
mann 75009 Paris France.
==================== =====3D=
================
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:20:29 von eroode
You need to read the output file, and separate it into the parts (lines?
strings? keywords?) that you are working with.
Then you need to store those parts, so that you can tell which ones are
there and which aren't. A hash is probably the best way to store those
items.
Then you need to read the input file, separate it into similar parts,
and check whether all of those parts exist in the output file.
If not, then you need to merge the input file into the output file,
somehow.
I'm sorry that my advice is so vague, but your description of what you
need is very vague.
Eric
-----Original Message-----
From: Beri Veera-ext, Reddy [mailto:Reddy.Beri-Veera-ext@bshg.com]
Sent: Monday, February 26, 2007 10:15 AM
To: Roode, Eric; ActivePerl
Subject: RE: How to compare two files and update to second file
Hi,
Thanks for your information. Output file has some additional data.
OUTPUT file should have INPUT FILE data but INPUT file need be have all
data of OUTPUT.
Thanks and Regards
Reddy
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Roode,
Eric
Sent: 26 February 2007 16:08
To: ActivePerl
Subject: RE: How to compare two files and update to second file
Why compare? Why not just copy the input to the output each time?
Eric
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Beri
Veera-ext, Reddy
Sent: Monday, February 26, 2007 10:05 AM
To: Brian Raven; ActivePerl
Subject: RE: How to compare two files and update to second file
Hi,
I am using Perl.
I have to compare INPUT text file and OUTPUT text file.
If OUTPUT file is not have some text which is there in INPUT file. I
need to write that text to OUTPUT file.
Ex:
INPUT file has (CADITEM, BSHITEM, ToolItem ) OUTPUT file has (CADITEM,
ToolItem)
I need to compare to files and write BSHITEM to OUTPUT file.
My problem: I am not able read two file at same time. I am getting only
from one file.
Please help me how to read two files and compare.
Thanks and Regards
Karunakara Reddy
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:22:31 von martin.thurn
I guess the OP doesn't know the open command, only how to use <>.
Hey Reddy, read `perldoc -f open` and `perldoc FileHandle`
- - Martin
Beri Veera-ext, Reddy wrote:
> My problem: I am not able read two file at same time. I am getting
> only from one file.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to compare two files and update to second file
am 26.02.2007 16:35:49 von Reddy.Beri-Veera-ext
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
Hi
Thanks for your information. Please get my sample from attachment. Please
tell me if it is wrong and guide me how to solve.
Thanks and Regards
Reddy
-----Original Message-----
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Thurn,
Martin
Sent: 26 February 2007 16:23
To: Brian Raven; ActivePerl
Subject: RE: How to compare two files and update to second file
I guess the OP doesn't know the open command, only how to use <>.
Hey Reddy, read `perldoc -f open` and `perldoc FileHandle`
- - Martin
Beri Veera-ext, Reddy wrote:
> My problem: I am not able read two file at same time. I am getting
> only from one file.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to compare two files and update to second file
am 26.02.2007 16:46:04 von n.haigh
Beri Veera-ext, Reddy wrote:
> Hi
> Thanks for your information. Please get my sample from attachment. Please
> tell me if it is wrong and guide me how to solve.
> Thanks and Regards
> Reddy
>
Could you also provide what you hope to see in your final merged file?
Are you simply trying to find the occurrence of things like
"56500000001295;A9" obtained from the "output.txt" file in the
"input.txt" file and copy the whole line containing "56500000001295;A9"
from "input.txt" over the whole line in "output.txt"?
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs