in reply to Re: partial match between 2 files
in thread partial match between 2 files
the output should be first_file second_file output ~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~ amayaM -> amayamAn -> amaya+mAn vismayaM -> vismayamAn -> vismaya+mAn souraM -> souramA -> soura+mA kamalZ -> kamalAn -> kamal+An .The code i wrote wont make any sense.
#!/usr/bin/perl #read dictionary open(RE,"file1"); while(<RE>) { chomp; my @tmp =split(/\,/,$_); $key="$tmp[0]"; #print "$key\n "; my @words=split(//,$key); } close(RE); my $length1 = $#words; #check for a partial match open(RE1,"file2"); while(<RE1>) { $inp_word4 = $_; my @inp_word1 =split(//,$inp_word4); #print "@inp_word1"; } close(RE1) my $length2=$#inp_word1; if($length1<$length2) { compare the array elements in another loop }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: partial match between 2 files
by Kenosis (Priest) on Dec 05, 2012 at 09:26 UTC | |
by lakssreedhar (Acolyte) on Dec 05, 2012 at 10:53 UTC | |
by Kenosis (Priest) on Dec 05, 2012 at 19:56 UTC | |
by lakssreedhar (Acolyte) on Dec 08, 2012 at 08:06 UTC | |
by Kenosis (Priest) on Dec 08, 2012 at 16:15 UTC | |
| |
|
Re^3: partial match between 2 files
by Athanasius (Archbishop) on Dec 05, 2012 at 09:26 UTC |