Link to home
Start Free TrialLog in
Avatar of tomatocans
tomatocans

asked on

HELP

#!/usr/bin/perl

                                  open(IN,"</home/tmclaugh/list/text.txt") || die "cannot open file>:!";
                                  open(OUT,">/home/tmclaugh/list/zinger1.txt") || die "Cannot open
                 file>:!";

                                  $/='ACCESSION NUMBER             : ';
                                  printf("%20s %20s %s\n",
                                       "Accession Number",
                                       "Word in Narrative",
                                       "Sequence");
                                  while(<IN>){
                                       my ($an)= /(\d+)/g;
                                       my @words;
                                       ($_)=/NARRATIVE\s+:(.+)\n\w+\s+:/gs;
                                       @words=/(\w+)(?!\n\w+\s:)/gs;
                                       my $i=0;
                                       for my $word (@words){
                                       $i++;
                                       printf("%20s %20s %d\n",
                                       $an,$word,$i);
                                       }
                                  }
                                  close(IN);
                                  close(OUT);


                                  will not open or print to OUT can someone help
ASKER CERTIFIED SOLUTION
Avatar of olthoff
olthoff

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tomatocans
tomatocans

ASKER

Thanks