thank you all.

On 3/15/06, Ad Ministrator <[EMAIL PROTECTED]> wrote:
>
> Sonika Sachdeva <[EMAIL PROTECTED]> wrote:
> >Hi,
> >thanks for the response,
> >
> >thats right , system function will block till the command is complete
> >
> >foreach $filename (@FILES) {
> >$retval = system("perl sample.pl $filename");
> >if ($retval ==0 ) { print "success with $filename, output shd
> >be $expectedname.zip in the current working dir.";}
> >}
> >
> >$retval has return status for system command , but if the perl runs with
> >error for the file , will it reflect in $retval.?
>
> The return value of the system call will be whatever the sample.pl exits
> with. If the sample.pl encounters an error while processing and calls exit
> with a value other then 0, then that value will be saved in $retval
> (assuming your example code).
>
> >and
> >is this the efficient way if the system command blocks for 10-15 mins?
>
> Yes. It is fine. This will continue the processing as soon as the
> sample.pl
> exits which seems to be exactly what you want it to do.
>
>
>

Reply via email to