🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #258

Re: Perl problems/bugs

#258
From: Tony Sanders
Date: Tue, 28 Nov 1989 03:32
28 lines
1270 bytes
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
Technical Details
Message-ID: <3065@cello.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!romp!auschs!d75!cello!sanders.austin.ibm.com
References: <3063@cello.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!romp!auschs!d75!cello!sanders.austin.ibm.com
From: sanders@sanders.austin.ibm.com (Tony Sanders)
Newsgroups: comp.sources.bugs
Subject: Re: Perl problems/bugs
Summary: sprintf %c broken?
Message-ID: <3065@cello.UUCP>
Date: 28 Nov 89 03:32:03 GMT
References: <3063@cello.UUCP>
Sender: news@cello.UUCP
Reply-To: sanders@sanders.austin.ibm.com (Tony Sanders)
Lines: 28