Scanning your code I note that I cannot see a use docParser anywhere in concepts2.pl... this may simply be because you missed out that bit ?

You say that the problem is that "none of the printing is shown in the browser". If you had included a small sample input file I could have looked at this a bit more deeply...

...however, something apparently impossible is happening. All the output from the print statements in docParser.pm is getting lost. Whenever you come to a startling conclusion like that, step back from the problem. Look at it another way. Assume for a moment that your conclusion is wrong: ask yourself, why else would there be no output ? The foreach my $key (keys %seqhash) loop sends each captured sequence to the parser... what if there were no captured sequences ? OK, so that's impossible too -- because you're sure that piece of code works. BUT do not stop there: that is something you can verify very quickly by sticking a print statement or two before the foreach to show what the %seqhash contains...

Looking at the "Process File" loop: (a) you can look for a blank line with just $line =~ m/^\s*$/; and (b) you need to consider what happens to $sequence during this loop. (Are you sure this bit works ?)

I'm not sure why you are collecting the name and the sequence in a hash... If you do get two sequences with the same name, the second will replace the first -- this may be deliberate ? You won't get the sequences out in the same order they went in -- this may also be deliberate ?


In reply to Re: Passing a file from a form, processing, and then outputting as html by gone2015
in thread Passing a file from a form, processing, and then outputting as html by bobekdj

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.