Re: I'm enhacing wwwstat...
Guy Honore' (guyh@ntserver3.quotron.com)
Thu, 24 Oct 1996 19:40:19 -0700
Lorenzo -=SPiDeR=- Lazzeri wrote:
>
> Hi all (?),
> I downloaded the wwwstat packages and I tried it. I found it very
> powerfull, with all kind of stats of web accesses which i wanted.
>
> The only thing which i found a bit poor was the output: I don't like
> the <PRE>formatted output in HTML pages. So I decided to add to the wwwstat
> the possibility to make html output using the more powerful <TABLE> tag,
> without forgettin' who prefer the "old" style output.
> So I'm adding two new switches -table and -notable which make
> possible the choice between the two styles. I choosed that -table could be a
> good default.
>
> I have to tell you that I actually am a programmer experienced with
> C/C++ and some other languages, but this is my first experience in Perl. So
> I encountred a problem: the Perl function printf works like C analogous? I
> mean: in C i can write something like
>
> printf("<TD> %s <TD>\n", string );
>
> and it works; may I write
>
> printf "<TD> %s <TD>\n", $string;
>
> in Perl? I tried but it doesn't seem to work... If someone would help me in
> solving this little problem I'll be able to post here a my own modified
> version of wwwstat in a few day...
>
> Thank you.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Lorenzo -=SPiDeR=- Lazzeri v. del pignone 2
> 50142 firenze
> e-Mail: spider@mbox.cosmos.it italia
> IRCnick: |SPiDeR|
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Lorenzo: just use C-syntax, parenthese and all, and "$" args:
printf("<TD> %s </TD><TD>%3d</TD>\n", $string, $num);
If you want an excellent primer, try:
"Programming Perl", by Larry Wall and Randal Schwartz (O'Reilly book).
--
Live long and prosper...