Does any body know why the printf is not printing anything out!
I tested the rest of the script by replacing the printf line with,
##########
print "$line";
##########
the file prints (with out any changes to the file, as expected). So
everything else is working apart from the printf.
Any help would be much appreciated.
Thanks.
GD
<script>
########################################################
&inserter;
sub inserter {
open (TESTFILE, "<CALL_SUMMARY_CHANGES4_5.HADES;21");
$file = <TESTFILE>;
$length = length($file);
@array = split(//, $file);
$splitcounter = 0;
for ($counter = 0; $counter < $length; $counter++) {
if ($splitcounter == 480) {;
push(@newarray, "\r");
$splitcounter = 0;
$counter--;
}
else {
push(@newarray, $array[$counter]);
$splitcounter++;
}
}
}
foreach $line(@newarray) {
$a = substr($_, 0, 18);
$b = substr($_, 32, 1);
$c = substr($_, 290, 10);
printf "%18s %1s %10s\n",$a, $b, $c;
}
########################################################