good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: iterating through array and saving matches to new array (updated)by AnomalousMonk (Archbishop) |
on Apr 15, 2018 at 21:41 UTC ( [id://1212951]=note: print w/replies, xml ) | Need Help?? |
... it works with multiple arrays: I'm not sure what you mean by "works" in this context. Is the following output what you expect? Something seems to have happened to the contents of the @b and @c arrays. Again, did you intend this? This result comes from the short-circuiting behavior of the && || and or logical operators; see perlop. (Please see the non-core module Data::Dump for the dd() function. The core Data::Dumper module has dumper functions that you will not need to install a module to access.) Update: Changed the array initializations in the example code above to make the point more clearly. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|