Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Thanks Linuxer, Here are my changes, now the program finishes and I have no error message but I only have the locus_acc_no = printed out several times and it has no value. Thanks, B
#!/usr/bin/perl -w use strict; use warnings; use lib "/d/user2/aszend01/BCII/240213"; use ModuleMatching; my $locus_acc_no = ""; my $key = 1; print '$key = ', $key, "\n"; # test for not allowing more than one file to work on unless (1 == scalar(@ARGV)){ die "two many files"; } # test if the infile cannot be opened open(IN, $ARGV[0]) or die "unable to open input file $ARGV[0]\n"; while (my $line = <IN>) { # give the number of records a new key number started with 1 incre +mented with 1 in each new record devided with "//" signs if ($line =~ /^\/\//){ $key++; print '$key = ', $key, "\n"; $locus_acc_no = ""; } # locus_acc_no if ($line =~ ModuleMatching::MatchLAC($locus_acc_no)) { print "locus_acc_no ", $locus_acc_no; # print $2, "\n"; # $hLocus_Acc{$key} = $1; # print "%hLocus_Acc{$key} = $1\n"; # $hLength{$key} = $2; # print "%hLength{$key} = $2\n"; } }

In reply to Re^2: matching problem by Balaton
in thread matching problem by Balaton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-23 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found