Tim Johnson wrote:
Gohaku wrote:
After using backticks to retrieve executable output, I would like
to know if there is a backtick alternative.

If you want the exact same function as the backticks, why not just make a small subroutine?

Maybe because it's unnecessary, since there already is an operator equivalent to backticks?

$exec = "ls -l";
$src = syscall($exec);

sub syscall{
   return `$_[0]`;
}

should work.

Should it? Did you try it? syscall() is a built-in Perl function, so the above does *not* work.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
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