supriyoch_2008 has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks,
I am a beginner in perl programming. I need a perl program to split an array and to get the sequence of elements identified by number from left to right. For example, I have an array
@k=”CCATGNNNTAACCNNATGNNTAGCC”;I am interested in getting the substrings between elements 3 and 11 and between 16 and 23 (first position marked as 1).
#!usr/bin/perl-w @k=”CCATGNNNAACCNNATGNNTAGCC”; $s3-11=code?? $s16-23=code?? Code???? Print” \nThe sequences are: \n $s3-11\n\n $s16-23.\n\n”; exit;
Result should be like this:
ATGNNNTAA
ATGNNTAG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to split an array identified by numbers to get the correct sequence of elements
by JavaFan (Canon) on Apr 19, 2012 at 12:03 UTC | |
|
Re: How to split an array identified by numbers to get the correct sequence of elements
by trizen (Hermit) on Apr 19, 2012 at 12:17 UTC | |
|
Re: How to split an array identified by numbers to get the correct sequence of elements
by Anonymous Monk on Apr 19, 2012 at 11:54 UTC | |
by BillKSmith (Monsignor) on Apr 19, 2012 at 12:45 UTC |