On Thu, Sep 25, 2008 at 11:55 PM, aa aa <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I try to open several files, if one of them failed, my program will die and
> then send the died information to a file.
>
> eg.
> open(AA, "a.txt") or die "can't open file a.txt\n";
>
> But I want to this string "can't open file a.txt\n" print to a file.
>
> Is anyone can help me?
>
> org.chen
> _________________________________________________________________
> Are you paid what you're worth? Find out: SEEK Salary Centre
>
> http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT


open STDERR, ">>error.log";
then the message from die will be appended to error.log.

Jialin

Reply via email to