Syntactic Confectionery Delight | |
PerlMonks |
Re^2: iterating through array and saving matches to new arrayby choroba (Cardinal) |
on Apr 15, 2018 at 21:46 UTC ( [id://1212952]=note: print w/replies, xml ) | Need Help?? |
&& imposes scalar boolean context on the first argument. Therefore, the grep on line 4 iterates over @d only provided @b and @c aren't empty. To iterate over several arrays, use comma:
It's also a good idea to test the code before posting here ;-)
In Section
Seekers of Perl Wisdom
|
|