Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Nested Foreach Loop skipping every other element??

by Kenosis (Priest)
on Feb 19, 2014 at 16:58 UTC ( #1075493=note: print w/replies, xml ) Need Help??


in reply to Nested Foreach Loop skipping every other element??

Seems grepping, as hdb suggested, may produce your desired results:

use strict; use warnings; my @DIR = qw{functions/myfunc.hml perltest/abs.hml perltest/abs3.hml p +erltest/abs4.hml perltest/acos2.hml perltest/zeros17.hml}; my @filtered = grep !m{^perltest/}, @DIR; print "$_\n" for @filtered;

Output:

functions/myfunc.hml

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2021-03-02 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (39 votes). Check out past polls.

    Notices?