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.
>
> Cheers!
> -Bill-

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.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to