Three things:
You don't do actually anything with the saved data.
Instead of saving $1 into an array, you might as well print it when you find it. But assuming you did plan to do something more sophisticated, such as sorting the elements, you don't need to print the array using a loop ... that's such a C thing to do. Perl is efficient when you deal with sets of data all-at-once, letting Perl do the iterating.
You might use join():
print OUTFILE join( "\n", @slotarray ), "\n";
Alternately, you could locally redefine the $LIST_SEPARATOR, $" :
{ local $" = "\n"; print OUTFILE "@slotarray\n"; }
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: $1 into an array
by TomDLux
in thread $1 into an array
by jamen_98
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |