You said works for the first files, buy then die with the massage "Can not change sample_ACCTGG.fq to ACCTGG.fq". But when I print $new, it is "LA01.fq" that is correct.
but the code is rename ($file, $new) or die "Can not change $file to $new, $!\n"; so the error message you quoted is incomplete, it doesn't state the reason it rename didn't work
This reason is everything | [reply] [d/l] |
Not to mention that the presented error message shows $new as being ACCTGG.fq, and the OP asserts that it is LA01.fq. Incorrect/incomplete reporting of error messages and other results makes remote diagnosis an exercise in clairvoyance.
...my crystal ball is still in the shop. (It kept reporting "line 42".)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
| [reply] |
| [reply] |
| [reply] |