blob: 3559bf79b65a193f117e752c233d571753d9ce9e (
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
|
#!/usr/bin/env perl
use warnings;
use strict;
my $file = shift(@ARGV);
open(MYFILE, $file);
my @words;
my $factor_f;
my $factor_e;
my $sentence;
while (<MYFILE>) {
chomp;
#print "$_\n";
$sentence = "$_";
@words = split(/ /, $sentence);
foreach (@words)
{
my ($factor_f,$factor_e) = split(/\-/,"$_");
print $factor_e . " " . $factor_f . " ";
}
print "\n";
}
close (MYFILE);
|