Hi all,

when i use  range operator in foreach loop it increases the elements in the list by 
one.
for eg : 
foreach(1..10)
{
print;
}
#prints  1,2,3,4,5,6,7,8,9,10

but if i need to set a hop for each number how do i get it ? something like stride 
functionality  so that it will print 1,4,7,10 
something like 

for(1..10 ,jump 3)
{
print; 
}

kindly  enlighten ,

thanks,
KM

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to