in reply to Re^3: system command
in thread system command

Note $file is subject to shell-escaping rules

Easily handled:

my $file = '/path/to/file'; my $output = `/bin/wc -l \Q$file\E`;