in reply to (jeffa) Re: sprintf() and CGI
in thread sprintf() and CGI

Jeff, thanks for the valid points ("strict" and "-w"), but that was just a quick example I wrote to exemplify the problem I found on a bigger script (which uses both "strict" and "-w").

The problem is that I don't want a decimal but a binary back, that's why I used "%b", as described here.

In fact, I ran your script, replacing the "d" for a "b", and it worked just fine on the command line (just like mine did before, even though it didn't had -w and strict on). But when I run it through the browser (as a CGI), it still returns "%04b"...

btw this is Perl 5.6.1 on Solaris 2.8 with Apache 1.3.19.