print B "@actualsyll\n";
####
print B @shift3\n";
####
#Loop gets all files matching ex. 2 opens them;
foreach $file () {
open (A, "<$file") || die "$file";
open (B, ">>awe.txt") || die "output";
#Making a loop of all lines in each file;
while ($line1 = ) {
#There are headers with information I do not need so this essentially cuts them out;
$line1 =~ s/^ |^ |^\s\s\s|\s{3,4}//;
#Chomping of the newline;
chomp;
#Making a loop of all lines in all files from ex. 2 without their headers;
foreach ($line1 =~ /^\d/g) {
#Splitting the files into the numbers to the first space, the 122, the word minus extra markers, the chopped up word before the ";, the final chopped up word;
if ($line1 =~ /\d\s\w|\d\s{1,2}\d|\d\s\s\d|\d \d|;\s\w/gi) {
$line1 =~ s/\s| |\s\s| |\s{2}/\t/g;
$line1 =~ s/\t\t|\t{2}/\t/;
($stamp,$extra,$orth,$a,$b,$c,$d,$e,$f,$g, $h,$i,$j,$k,$l, $m, $n,$o,$p,$q,$r,$s,$t,$u,$v,$w,$x,$y,$z) = split(/ <|>;|\t/, $line1);
#splitting all of the information after the first ";" into 2 scalars;
$split = "$a $b $c $d $e $f $g $h $i $j $k $l $m $n $o $p $q $r $s $t $u $v $w $x $y $z";
($canon,$spoke) = split(/; /, $split);
#Getting rid of some additional extraneous material (i.e., unwanted spaces...);
$orth =~ s/;//;
$spoke =~ s/\s{1,}$|\t{1,}$//g;
#Making an array that will bind everything together (mostly to aid in later coding not yet created);
@general = ($file, $stamp,$extra,$orth,$canon, $spoke, $syll);
}
#combining all of the $orth's into a loop;
foreach ($general[3]) {
#Making each column into its own array;
push(@array0, $general[0]);
push(@array1, $general[1]);
push(@array2, $general[2]);
push(@array3, $general[3]);
push(@array4, $general[4]);
push(@array5, $general[5]);
}}}}
close A;
#Making a loop of each array created above;
while (@array0) {
#Removing each element one at a time for later (not yet created) conditional searching of each array element;
$shift0 = shift @array0;
$shift1 = shift @array1;
$shift2 = shift @array2;
$shift3 = shift @array3;
$shift4 = shift @array4;
$shift5 = shift @array5;
#Prints out the $orth word of each line on its own line (used mostly as a debugger right now);
#print B "$shift3\n";
}
#Open file matching ex.1;
open (C, ">all.txt") || die "output";
#Making a loop of all lines in example 1 file;
while ($line2 = ) {
#Getting rid of the newline;
chomp $line2;
#Split all lines;
@firstgrouping = split(/, |,\s|,\t|,|\s,|\t,| ,/, $line2);
#splitting the lines in $firstgrouping[2] by the numbers so that text before and after number are different indexed scalars;
@actualsyll = split(/\d |\d\s|\d\t|\d|\s\d| \d|\t\d|\t\d\t|\s\d\s| \d /, $firstgrouping[2]);
#Printing the new version of @firstgrouping[2];
#print B "@actualsyll\n";
print B "$shift3\n";
}
close C;