Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Array - Reading frame problem

by Nadiah (Novice)
on Jul 16, 2005 at 13:22 UTC ( [id://475443]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://475443]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-16 15:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found