Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: how to invoke unix commands in perl

by mirod (Canon)
on Feb 08, 2001 at 20:08 UTC ( #57196=note: print w/replies, xml ) Need Help??

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.