blob: bf6657742e09620b27a89f11c278917d66901522 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/env perl
use warnings;
use utf8;
require Encode;
use IO::Handle;
$input = <STDIN>;
#print $input;
$filename = shift or die "Error: missing hindi urdu file argument!\n";
open(FILE,$filename) or die "Error: unable to open file \"$filename\"!\n";
binmode(STDIN, ':utf8');
binmode(STDOUT, ':utf8');
binmode(STDERR, ':utf8');
binmode(FILE, ':utf8');
$c=0;
while (<FILE>)
{
chomp;
@F=split("\t");
$hash{$F[0]."\t".$F[1]}=$F[$#F];
$c++;
if($F[$#F] < $input)
{
print "$F[0]\t$F[1]\n";
}
}close FILE;
|