Thank you for answering

I have doubts about all the script because like you I think it is a bit confusing... I'm a new learner of Perl and in general of programming language and as exercise I'm trying to modify this script in order to make it better.

I understand for what it has been done (it is a quality trimming for a FASTQ file) but if I were the programmer I dont' think I would have written the script like that.

Maybe this will be a stupid question but I have serious problems to understand the variables (like $sub) that have been used, in particular when we have the feature "substr". I have to find more info in the manual and I will do that for sure... also the variables -$#qual: why I have to write them like that?

Moreover, I noted the absence of the use strict, use warnings and probably of use diagnostics... In fact I rewrite the script using them and with use script I don't have any problem but when I use warnings and diagnostics I have an error of unitialized value in operation that I can't really resolve (if you prefer I could write you down my script but it is practically the same thing only with "my". I have also changed the way to read the FASTQ file preferring the simple way to write directly in the script the name of the FASTQ file of my interest).

I'm really sorry to annoy all of you with these problems but I would really like to understand how to work with this script and how I could ameliorate it...

Thank you very much

In reply to Re^2: explanation of passages of a Perl script by uuuiii
in thread explanation of passages of a Perl script by uuuiii

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.