|
|
| go ahead... be a heretic | |
| PerlMonks |
Re: Scalar assignment with loop iterator considered bad?by Adam (Vicar) |
| on Jul 22, 2005 at 19:30 UTC ( #477324=note: print w/ replies, xml ) | Need Help?? |
|
In this particular scenario, I'd use join(). Why write code to do what a native perl function will do for you? From a functionality perspective, letting join() do the work is probably better than concatenating a bunch of stuff in a loop. I'm sure you could come up with some example where looping was better - if, say, you were doing other stuff at the same time.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||