in reply to subroutines + returning more than 1 value
(@segment1, @segment2, @segment3, @segment4, @segment5) = @_;
everything in @_ is assigned to @segment1, and nothing to the other arrays. This is because everything is flattened to one list.
Furthermore, as soon as a subroutine encounters a return statement, it does just that: return from the subroutine. No other statements in the sub are called.
What you probably want is pass references to the arrays in the sub, and return a list of references to arrays.
Perhaps you should first actually pick up a book and take the time to learn Perl. Then you will finish your assignment a lot sooner than coming to be spoonfed over and over again on Perlmonks. How many very basic questions have you asked here related to pairing up base pairs?
Abigail
|
|---|