Re: Module to pull Netstat summary information?
From: R. Joseph Newton (rjnewton_at_efn.org)
Date: Sat, 28 Feb 2004 18:22:02 -0800 To: email@example.com
WC -Sx- Jones wrote:
> R. Joseph Newton wrote:
> >>>>&print_if_Warn if (system("nstat -a") / 256);
> >>>>&print_if_Fatal if (system("netstat -nr") / 256);
> > Works fine as:
> > print_if_Warn() if (system("nstat -a") / 256);
> > print_if_Fatal() if (system("netstat -nr") / 256);
> Yes, so long as you dont use
> perl -w progname
> Otherwise you get:
> Useless use of a constant in void context at sxWARN line 12.
> Useless use of a constant in void context at sxWARN line 13.
I'd have to see the full code and coding context for that. Can you show the
code as run, por better yet run the whole thing at the command line, and post it
entire. You should not get those results unless \you have remove the parens
from the call.
In Perl, every method has aan implicit argument list, which may be empty. So
parens actually communicate something about the call from a logical view. The
vestigial address-of operator OTOH, is more a low-level implementation detail,
akin to goto function_nmae. I'll stick with the parens.