in reply to Re^9: how to access elements in perl
in thread how to access elements in perl

There is also one another problem, when i execute the above code it gives output starting from 289 - 489.. but not from 0 - 199.

Replies are listed 'Best First'.
Re^11: how to access elements in perl
by BrowserUk (Patriarch) on May 13, 2014 at 11:52 UTC
    it gives output starting from 289 - 489.. but not from 0 - 199.

    Hm. If you look at the output I posted above, my code outputs the counts for 0 - 199, 1 - 200, 2 - 201, ...

    So what did you change? (Post your current version of the code and don't forget the <code></code> tags.)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Check this code : This code gives me output starting from range: 39761 .. 39960 rather than 0-200. And one more thing it shows G+C and GC percentage as such as i given in the code, i want the total of G+C e.g. 30+40= 70 rather than 30+40.

        You need to read and understand the documentation on printf. (Click the preceding link and read.)

        You might consider taking a Perl programming course or at least buying or borrowing a book.

        Try this free, online Perl Pprogramming book for beginners.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.