Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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.


Comment on Re: how to invoke unix commands in perl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://57196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2014-07-12 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls