in reply to Unknown problem, throws "Useless use of privt var in void contxt"

Perl can give confusing line numbers in if ... else statements sometimes. When that happens, the error is usually a few lines above below the reported line. but it here it appears above, for some reason

This:

if ($month => 10) {
is wrong, and could be the cause, since it evaluates $month in void context.

Did you mean if ($month >= 10)  { instead?

Replies are listed 'Best First'.
Re^2: Unknown problem, throws "Useless use of privt var in void contxt"
by S0ci1_Hak0n (Novice) on Jan 21, 2008 at 22:51 UTC
    lol. Don't know how I missed that! Thanks