On 10/29/19 10:48 PM, 刘东 wrote:
Dear every one:
I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp01_1_both.txt. However, when I run this scrip, it does not work, and display the information as follows:
...
Semicolon seems to be missing at carp01_1_both.txt line 44993.
Number found where operator expected at carp01_1_both.txt line 44994, near "55659 1"
    (Missing operator before  1?)
Number found where operator expected at carp01_1_both.txt line 44994, near "ATCACG    55"
    (Do you need to predeclare ATCACG?)
Number found where operator expected at carp01_1_both.txt line 44994, near "55    116"
    (Missing operator before     116?)
syntax error at carp01_1_both.txt line 1, near "979:"

it appears that perl is trying to compile one of your data files. show the command line where you run your script


perl script:
#!/usr/bin/perl -w
better to use warnings than -w. also use strict is important
open(NAME,"<$ARGV[0]")|| die;
open(SECON,"<$ARGV[1]")|| die;
open(SELEC,">$ARGV[2]")|| die;
your die lines should say which file failed to open

uri

Reply via email to