Matt 100 John 150 Laura 150 #### format_style(); # FUNCTION FORMAT_STYLE----------------------------------------------------- # Final stage where text is replaced to correct format sub format_style { # Function calls to create desc.txt open (VER,"version.txt"); while (defined ($rows = )) { chop($rows); ($rows1,$rows2)=split(/\ /,$rows); $names[$i]=$rows1; $vers[$i]= $rows2; $i++; } close VER; $i=0; $ch1=":"; $ch2=" "; open (ROWS, "desc5.txt") || die "File not found"; while (defined ($rivi = )) { chomp $rivi; if($rivi =~ /^$names[$i]/) { chomp $rivi; # IN THIS PART I DONT HAVE ARRAYS ANYMORE AVAILABLE # Counting length of words my $L1=length($names[$i]); my $L2=length($vers[$i]); #print "Length for $names[$i] =$L1, and for $vers[$i]=$L2\n"; my $pad1=(27-($L1)); my $pad2= (6-($L2)); my $pad1_1=(" " x $pad1); my $pad2_2=(" " x $pad2); #chop $vers[$i]; $rivi="\n$names[$i]$pad1_1$ch1$ch2$vers[$i]$pad2_2$ch1\n"; open (E,">>style1.txt"); print E $rivi; close E; $i++; } elsif ($rivi) { chomp $rivi; my $pad3=(" " x 36); open (E,">>style1.txt"); print E "$pad3$rivi\n"; close E; } } close ROWS; system 'cp style1.txt desc5.txt'; system 'rm style1.txt'; }