Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: PUZZLED

by Punto (Scribe)
on Aug 24, 2000 at 19:30 UTC ( [id://29515]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to PUZZLED

How about 'mod'?
$direction = 1; #set to -1 to go to opposite direction @array = split(//, $string); for (@array) { print $array[$i]; $i = ($i + $direction) % ($#array + 1); };
You have to initialize $i.

UPDATED: Added $direction (I think I was going backwards first)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://29515]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.