in reply to exec vs. backtick-and-assign performance

The only difference I can see is that exec runs the command directly while the backticks invoke the shell and the shell runs the command.

If you want the command's STDOUT then try using open like:

my $output = do { open my $fh, '-|', '/etc/init.d/networking', 'restart' or die "Can +not open pipe from '/etc/init.d/networking' $!"; local $/; <$fh> };