in reply to Re: Splice an array into another array
in thread Splice an array into another array

Thanks for the reply, really appreciate it.

So are you saying that, I cannot store DNA files I downloaded from Genbank as arrays via the filehandler, and then modify them? Because all of the example I have seen where people modify arrays (in my case I am obviously interested in the splice function) amounts to the user manually type in some elements, store them as array and then modify them (like the code you provided).

  • Comment on Re^2: Splice an array into another array

Replies are listed 'Best First'.
Re^3: Splice an array into another array
by huck (Prior) on Jun 23, 2017 at 23:10 UTC

    Let me try again

    @DNA3 = <DNA3handle>; creates an array where the contents of each line of DNAHANDLE (along with any line endings) becomes its own element of the array

    It is not an array where each element is a single character of the file

    @DNA3 = <DNA3handle>; chomp @DNA3; @DNA3=split('',join('',@DNA3));
    Would be that kind of array (without line endings (chomp))

      THANK YOU!!! If I could give you a kiss over the monitor I would, thank you so much for your explanations(+ others as well), you have no idea how much you helped me. Once again thanks for the solutions, you are the best!