Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: System command not working

by monsoon (Pilgrim)
on Jul 10, 2012 at 15:04 UTC ( #980884=note: print w/ replies, xml ) Need Help??


in reply to Re^2: System command not working
in thread System command not working

Any time I invoke anything on the OS via 'system' or backticks or any other way, I'd be worried that the program being called may not be in the path of the user running the script.

If you prefer running your one-liner as an OS command from inside a script, why not run it from a shell script then?

#!/usr/bin/sh /usr/bin/perl -ne 'print if $. >=17 && $. <= 39' infile.txt >outfile.t +xt


Comment on Re^3: System command not working
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-09-16 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls