in reply to how to invoke unix commands in perl

Read the doc! Perl comes with lots of docs. man perl on a unix box or use the Perl documentation that comes with the Activestate on Windows.

perldoc system would work fine (make sure you read how to avoid shell interpolation if you run in an insecure context like CGI)

Lastly my $var= `wc -l file`; will put the result of the command in $var.