Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Problem with system ()

by MZSanford (Curate)
on Mar 18, 2003 at 14:20 UTC ( #243984=note: print w/replies, xml ) Need Help??


in reply to Problem with system ()

You may want to use cwd in your program, then use system(). Beware of the fact that on most systems (and i suspect Win32 too) system() opens a new shell for each call. So, your first would chage directory and then close, and your second would delete files in the current directory.

As a side note, if you are deleteing files you may want to look at unlink, which will let you check the status of your deletes. (glob + unlink = gooood)


from the frivolous to the serious

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://243984]
help
Chatterbox?
[LanX]: ehm ... I woke up my *boobs* ?
LanX where is the camera?
Tux => $HOME
[Eily]: you wrote boos instead of boss, and jedikaiti read that as boobs :)
[LanX]: Win claims only 8 MB left on C: how do I find out where the problem happens?
[Eily]: by Tux. And going home sounds like a good idea
[Eily]: LanX pretty much everywhere except in 8MB ?
[Eily]: s/by/bye/ someone hacked my keyboard I'm sure
[LanX]: good point! :)
[Eily]: LanX I don't understand the question though, you want to know what is taking so much space?

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2017-09-20 16:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (237 votes). Check out past polls.

    Notices?