laziness, impatience, and hubris | |
PerlMonks |
Re: Map not giving me what I thought it would.by damian1301 (Curate) |
on Jun 02, 2001 at 08:54 UTC ( [id://85159]=note: print w/replies, xml ) | Need Help?? |
As the above two mentioned, it is because of the substitution's return value. So, instead of using your way of joining the values, you can just put the whole thing one map with the same functionality and without the extra newline.
Simple stuff, basically just does what you were doing then uses the "$var = $var.stuff" operator (which I love dearly =) to append a newline onto the end of each line. $TMTOWTDI++; Tiptoeing up to a Perl hacker. Dave AKA damian
In Section
Seekers of Perl Wisdom
|
|