473,394 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to compare two fields of two different files in perl

1
hello!

I need help whith perl.

I have 2 files, i whant to open them compare one colun and if they iqual i whant to write at the 1ª file some coluns of the second file.

Exemple:
File 1

2; apartamento; T2; manuel; 120.000€; Activo
4; moradia; V4;José; 250.000€; Suspenso

File 2
12; manuel; arcozelo; 234567888; activo
23; josé; Londres;004444444;Activo

Result
2; apartamento; T2; manuel; 234567888; 120.000€; Activo
4; moradia; V4;José; 004444444; 250.000€; Suspenso

Can you help me please.

Inês
Sep 12 '10 #1
1 2057
RonB
589 Expert Mod 512MB
What part is giving you trouble?

What have you tried?

Have you read these perldoc's:
perldoc -f open
perldoc -f split
perldoc -f splice
Sep 12 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vaggelis | last post by:
I am interested to hear from colleagues that used Quicktest professional two compare two xML files. I am interesting specifically to hear how much success they had to parametize the filenames and...
1
by: Frank | last post by:
Hi, is there a way to use XSL to compare two XML files to verify if a "record" in an XML file has changed of parent in another XML file ? I am trying to implement a template in an XSL stylesheet...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
2
by: TOI DAY | last post by:
I am badly in need of a routine to binary compare two large files. The boolean result true/false would do. Can anyone help out with the code? Thanks in advance
0
by: TOI DAY | last post by:
I am badly in need of a routine to binary compare two large files. The boolean result true/false would do. Can anyone help out with the code? Thanks in advance
2
by: yinglcs | last post by:
I am new to python. How can I compare if 2 files has duplicate entries in python? Is there an example for that? What if the files are big and I don't want to read the whole file in memory. ...
11
Vasuki Masilamani
by: Vasuki Masilamani | last post by:
Hi, Can any one help me in writing a script in Perl to compare two csv files and pick out the records which show differences? Any responses would be appreciated. Thanks, Vasuki
3
by: chinnu2809 | last post by:
hi i have two dat files foldername06.dat(created on feb 13) and p_06(created on feb 16) both the files are output files and are same except the date which occurs on each line of the output ...
2
by: m | last post by:
I have a script I would like to write but I am not sure of where to start / approach. Perhaps someone could help direct me in the right direction. Any advice is appreciated. I would like to...
4
by: panipsilos | last post by:
Hi , I need to compare 2 XML files in C# . I dont need to find the changes , but just to check if they are the same or not. Which is the best and fastest way to do it? thnx in advancee
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.