Re: problem about the perl code. thanks for any comments



yezi wrote:

the second version of code is posted on the above, the chomp is
alredy deleted . and closedir is added, but still have problem

Your original problem was described as such:

Do not know why it can not open file (*.RD ) in the current
directory.

But you still haven't asked Perl why.

open myRDfile,$file or die "Error:Could not open $file ";

open myRDfile, $file or die "Error:Could not open $file -- $!"; -----------------------------------------------------------^^

This may give you the answer to your question. If not, post the error message.




.