Perl problems/bugs

Tony Sanders sanders at sanders.austin.ibm.com
Tue Nov 28 14:32:03 AEST 1989


I traced this problem down from op.sprintf into the %c function in
sprintf.  Anyone else having this problem????

script:
    #!/usr/bin/perl
    $x = sprintf("%c",65);
    if ($x eq 'A') {print "ok 1\n";}
    else {print "not ok 1 '$x'\n";}
    for ($i=0;$i<length($x);$i++) {
	$y = substr($x,$i,1);
	printf("\t" . '%2d("%s")  ',ord($y),$y);
    }
    print "\n";

output:
    not ok 1 'A'
	 0("")           0("")           0("")           0("")           0("")  
		       . . . [several more lines of nulls] . . .
	 0("")           0("")           0("")           0("")           0("")  
	65("A")  

 ---------- ALSO -----------

As a side note I'm also having problems with op.stat:
    if (-l 'perl') {print "ok 25\n";} else {print "not ok 25\n";}

-- sanders
Lost in a lost world -- Moody Blues



More information about the Comp.sources.bugs mailing list