Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: how to push 5th element from one array to another array

by ctilmes (Priest)
on Oct 27, 2009 at 20:14 UTC ( #803511=note: print w/replies, xml ) Need Help??

in reply to how to push 5th element from one array to another array

my @arr = qw(1 2 3 4 5 6 7 8 sd frd sed sddfsd asecf ssdd myh); my $i = 1; my @arr2 = grep { $i++ % 5 == 0 } @arr;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803511]
[Cow1337killr]: <p>stevieb, you should leave an insightful comment at https://plugins. idea/plugin/7796- perl</p>
[Cow1337killr]: (Oops. HTML paragraph markup not needed.)
[stevieb]: Cow1337killr yeah, you're probably right. I have communicated to the author directly, and here on his threads. It's a tremenous setup. With Devel::Camelcadedb , you get full perl debug support too

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-02-20 21:04 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (302 votes). Check out past polls.