\tl:਒ \tr:ਓ \ca:ਕ \ra:ਖ \ka:ਗ ... #### \tl\ca\ra\tr\ka ... #### ਒ਕਖਓਗ #### #!/usr/bin/perl use strict; use warnings; my $dfile = 'data'; my $sfile = 'source.txt'; my $tfile = 'target.txt'; open (DFILE,$dfile) or die "can not open"; open (SFILE,$sfile) or die "can not open"; open (TFILE,"> $tfile") or die "can not open"; my %words; while () { chomp; my ($key, $val) = split /:/; $words{$key} .= exists $words{$key} ? "$val" : $val; }; while (my $s = ) { chomp($s); my @words = split / /, $s; foreach my $val (@words) { } for my $i (0 .. $#words) { $words[$i] = $words{$words[$i]} if (exists($words{$words[$i]})) } print TFILE join(' ', @words),$/; print TFILE "
"; } close(SFILE); close(DFILE); close(TFILE); ##
## \ca \ra \ka \tl #### \ca\ra\ka\tl