Everything works except the statsm (i added that part).

Huh? I don't find anything in either of those snowdog downloads that matches "statsm" -- I don't have a clue what you're talking about.

I doens't create a file statsmmrtg.

Huh?? I don't find anything in either of those snowdog downloads that matches "statsmmrtg" -- I don't have a clue what you're talking about (again).

Maybe it's just my own lack of exposure to the domain you're trying to work with here, but I also don't see any evidence that you're actually responding directly to anything I said in my previous reply.

Okay -- I think I get it. In the OP code above, there's this, at line 128:

$statsmmrtg=$i[3];
Now, can you explain why this variable ($statsmmrtg) is never used anywhere else in the OP script? It seems logical that if you only assign a value to it and then never use it, it won't show up in any file or whatever.

Then at lines 195-199, you have:

if ($statsm ne "") { open(OUTPUT, ">$datapath/statsmplain"); print OUTPUT "$statsm"; close OUTPUT; }
and these are the only mention of this variable ($statsm) -- it never gets anything assigned to it. So what would you expect to appear in a data file, if all you print to it is an undefined (null, empty) value?

Maybe if you used the same variable name in these two places, you'd get your data into that file (assuming you have write permission).

Turning on warnings would help -- it'll tell you when you only use a given variable name once, and when you try to print an undefined value. Using strict would help more.

Oh well. Good luck with that, whatever it is.


In reply to Re^3: IRC Stats by graff
in thread IRC Stats by fx-

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.