in reply to Split Function - Positions

You don't want split. You want to use a regex.
use strict; my @genes; while ($screen =~ /([^X]+)/g) { push @genes, $1; print "$1 occurred at ", pos($screen) - length $1, $/; }

The trick is that pos() returns the position that the matcher is currently at, after the current match occurred. So, if you want to find out where the match started, you subtract the length of the match from the place the match ended.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested