in reply to Re^5: iterating through array and saving matches to new array
in thread iterating through array and saving matches to new array
UPDATE: I have now forgotten the exact code that I used to "return nothing", but something like this (untested) should work:
This () is not "undefined", it is absolutely nothing. Of course it it possible to combine map and grep to filter out undefined values. I remember doing this for some reason, but it's been a few years. If someone wants to do this, just knowing that it is possible will get you started. perl doc map for more info.map{some condition ? $val : ()}@array;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: iterating through array and saving matches to new array
by AnomalousMonk (Archbishop) on Apr 21, 2018 at 20:16 UTC | |
by Marshall (Canon) on Apr 23, 2018 at 20:40 UTC | |
by AnomalousMonk (Archbishop) on Apr 23, 2018 at 22:56 UTC |