Um, you say you "edited" this script, so I would assume you didn't "write" it (i.e. from scratch). It would probably be polite, at least, to say who wrote it or where it came from, and it would certainly be helpful to know what parts were edited by you (maybe even what they were like before you changed them) -- e.g. did you change something below the comment that says
DO NOT MODIFY ANYTHING BELOW THIS LINE ?
Have you checked that the directories cited in $datapath and $pidfile actually exist, and that you have write permission in those directories?
Is there anything else you could tell us about its expected and/or actual behavior? ("it doesn't take the stats" seems kind of vague) -- e.g. are there any error messages or other outputs?
Have you tried stepping through it with the perl debugger, to see how the control flow is going and what sorts of values are being assigned to variables?
Sorry, but that's about as much help as I can give, based on what you've posted.
update: Well, I could offer one more tip, but it involves modifying code below the line that says DO NOT MODIFY ANYTHING BELOW THIS LINE -- in the "saveinfo" sub, none of those "open(OUTPUT...)" lines have error checking, so if the open fails, you won't hear about it, and nothing gets saved. If you change those to:
open(OUTPUT, ">name_expression") or die "name_expression: $!";
(where "name_expression" is just a placeholder for whatever string is being used as the file name to be opened), you might get more information about what's going wrong. But maybe not -- hard to say.
(P.S. Welcome to the Monastery!)
In reply to Re: IRC Stats
by graff
in thread IRC Stats
by fx-
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.