in reply to Re: Array - Reading frame problem
in thread Array - Reading frame problem

No.. what i meant was if i apply the code $frame2 = substr($sequence, 1); to $sequence, the position of "2" will be in position "1" as i extract it using substring.
What i meant is if there's anyway for me to extract "234567890" by using an array, instead of substr because i wan "2" to be in position 0.

Replies are listed 'Best First'.
Re^3: Array - Reading frame problem
by jdporter (Paladin) on Jul 16, 2005 at 13:46 UTC
    If what you mean is you want the array equivalent of substr, it's array slices. (splice looks similar to substr syntactically, but is different in that it's destructive of the source array.)
    @frame2 = @sequence[ 1 .. $#sequence ];
    The module Tie::OffsetArray could probably be used cleverly for this kind of frame-related problem.