Lorenzo Caggioni am Dienstag, 6. Dezember 2005 10.19:
> Hi!
> I write a big program in perl that open some file, and copy them to an
> other directory.
> To do move files I use this command:
>
> system("mv","in_file/i","in_file/o") == 0
> or die "Cannot reject input file: $! \n";
The File::Copy module with its move subroutine provides a more portable way of
moving files around.
system starts a new process. Avoid it, if not necessary.
> At the beginning, when the program aws little, it worked fine: If it can't
> find the file it wrote the message "Cannot...."
> Now, after adding some new command the program exit with no error message.
> What can be appened?
It seems that the additional code broke something, but since we don't know
what this code is...
Does your code include
use strict;
use warnings;
?
This is always useful to get some hints about possible errors.
hth, joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>