in reply to Re: Re: Frustrated with system calls
in thread Frustrated with system calls


Two basic rules that are generally true when dealing with commands is to always check the return values and to keep as much within perl as you can. Try using the File::Copy module (not certain if it comes with 5.005), it should make things easier as it will error to screen something useful (not always true of system commands).

For a command like cp perl will wait in my experience. If you are worried about this you can pause your script for a second (or whatever time it usually takes plus some seconds for good measure) to make certain the shell command is finished. But also check the return value (with the system call this is relatively easy), just in case.

HTH,
jynx