Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: system command is not working

by vinian (Beadle)
on Dec 07, 2011 at 05:55 UTC ( #942161=note: print w/replies, xml ) Need Help??


in reply to system command is not working

check the current working directory when execute the command, it's possiblely in the user's home directory who execute the command . or try this
#!/usr/bin/perl # a.pl use strict; use warnings; system("ls -lrt > /tmp/a.out");

Replies are listed 'Best First'.
Re^2: system command is not working
by gulla (Initiate) on Dec 07, 2011 at 06:14 UTC
    Hi, Thanks for the reply. Definitely works whatever you have suggested. However, if I execute a shell script with "at" command like below #b.sh at -f a.pl now it doesnt work. The system command in the perl script is not recognized. Can you please try your end.. Thanks, Gulla
      where is the time specification for your "at" comand?. It seems that your script waits forever

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://942161]
help
Chatterbox?
[Discipulus]: ah! how do you say in english? .. i was sure..
[Discipulus]: ah turned
[pryrt]: I think I actually like "finished 18", because really, it's been 18years since his birth, so he's finished 18 years. :-)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-01-18 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (214 votes). Check out past polls.

    Notices?