Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Array - Reading frame problem

by trammell (Priest)
on Jul 16, 2005 at 15:59 UTC ( [id://475465]=note: print w/replies, xml ) Need Help??


in reply to Array - Reading frame problem

Hard to say exactly what it is you want (you use the word "array" without using any arrays), but here's a shot:
#!perl -l my @seq = qw/ 1 2 3 4 5 6 7 8 9 0 /; for (1 .. 5) { print "frame $_: ", getframe($_,@seq); } sub getframe { my ($n,@in) = @_; $n--; return join '', @in[ $n .. $#in ]; } __END__ frame 1: 1234567890 frame 2: 234567890 frame 3: 34567890 frame 4: 4567890 frame 5: 567890

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found