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

Re^2: manipulating an array of anonymous arrays ...

by chexmix (Hermit)
on Apr 25, 2008 at 16:26 UTC ( [id://682865]=note: print w/replies, xml ) Need Help??


in reply to Re: manipulating an array of anonymous arrays ...
in thread manipulating a matrix

Thank you. I am going to try something like this with the modification that I am seeking to "toss out" the results that fell betweentwo values. I am not sure how to modify that use of grep but will have fun experimenting with it.

I will try to have fun with it anyway. Working on this has involved a lot of encounters between me and my limitations (current knowledge, learning speed, and so on pretty much ad infinitum). I get lost sometimes between feeling humble ("I have so much to learn") and feeling like a deer in headlights ("I will never ever get it, my chops are those of a 3 year old and I will eventually be working at a fast food chain").

A constant diet of crow gets old, especially if like me you are vegetarian (the veggie crowcakes aren't very good, yet). :)

  • Comment on Re^2: manipulating an array of anonymous arrays ...

Replies are listed 'Best First'.
Re^3: manipulating an array of anonymous arrays ...
by mscharrer (Hermit) on Apr 25, 2008 at 16:33 UTC
    grep returns all element for which the code block returns boolean true, so you have to change the code block to return true if the results are not between two values:
    my @array = grep { $_->[0] <= $low || $_->[0] >= $high } @array;
      Thanks - I worked it out! :D

      It's a small thing, but at my level that's what I have to hold onto.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-18 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found