Without knowing much about Tie::File, it seems that you either don't know or have forgot about the concept of prototyping.
Whe you define a sub in Perl, you do it by writing
sub NAME {
CODE
}
There is another option though, which is prototyping. This means that you can provide the compiler with additional information to facilitate the calls to your subroutine. this prototyping is done with the following syntax
sub NAME (PROTOTYPES) {
CODE
}
Note the additional parens. When PROTOTYPES is the empty string, i.e. when you just provide parens, the compiler will always call your function in a
void context and the @_ array will be empty.
You get the first few error messages, because the compiler "knows" that the sub is prototyped but it doesn't know the prototype yet, I don't know about the last few error messages.
In any case, changing your function declaration to
sub update_threads() {
should at least eliminate the first few error messages.
P.S.: Which part of your code has what line number?
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.