Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: how to access elements in perl

by sundialsvc4 (Abbot)
on Apr 28, 2014 at 16:33 UTC ( [id://1084148]=note: print w/replies, xml ) Need Help??


in reply to how to access elements in perl

Another way to say it might be that the two-lines of the original post really do not give any concrete details as to, for example, what the input file actually looks like, and very little detail as to what the intended algorithm must be.   Of course, bioinformatics is a very specific vertical within which the implied details of such a request might be “fully understood.”   I would not know – it is not my vertical.   It does seem to be yours, BrowserUK.

With regard to your particular reply, though, I would observe that it is extremely terse and devoid of comments.   There is a lot going-on in that programming, in almost every single line, such that someone who also knows a lot about the Perl language could gaze in (justifiable) wonderment at it.   However, anyone who knew less about Perl might find it difficult or even impossible to follow.   The two statements, alone, which populate $dna in your example are stuffed with “golf.”   I say that, not as any criticism of you, but rather, to point out why the result might well be “blank looks.”   Knowing how to translate that example into the “key ideas” behind it might be even more difficult, according to one’s advance knowledge of Perl in-particular and programming in-general.

Since the OP says almost-nothing about what he wants, and nothing about what he is starting or ending with, and relies heavily upon the presumed-to-be mutually understood conventions of the bioinformatics vertical, this is a very tricky OP to respond to.   (S)He also says nothing about the OP’s experience with the Perl language, hence ability to undestand and to make meaningful use of a highly-condensed example.   Writing a “good” OP is always a bit of an art, and writing a response to “two-liner” is equally tricky.   The responses in this thread seem to be a combination of good-intentioned requests for further clarification, and an (intrinsically) difficult-to-understand Perl code-example.   Probably, we should shoot for a balance between the two.

Replies are listed 'Best First'.
Re^2: how to access elements in perl
by BrowserUk (Patriarch) on Apr 28, 2014 at 18:52 UTC

    The fact that after 7 years of being around this place you still find yourself "gazing in wonderment" at such a simple piece of code just typifies your attitude.

    You learnt a bit of programming about 25 years ago -- what was it? COBOL? Fortan77? -- and you've never bothered to learn anything new since.

    If the OP wants to learn, he has only to ask for clarification of those things he doesn't understand. If all he's after is solving this particular problem then he can save himself the bother. But if he comes back asking for another freebie, he'll be far less likely to get it a second time.


    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1084148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2024-04-18 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found