in reply to Re: Sub Perl Scrips
in thread Sub Perl Scrips

Avoid `back-ticks` unless you need to get at the output (as you do in your second example). Using back-ticks in a void context only makes perl do extra work unnecessarily. In this case, I'd use system instead.

Replies are listed 'Best First'.
Re: Re: Re: Sub Perl Scrips
by Anonymous Monk on Jan 28, 2001 at 07:26 UTC
    Why can't backticks use defined(wantarray) to find out if they where called in a void context, and if so, do not return or capture the output? (Redirecting to /dev/null comes to mind)