However, assigning to a simple lexical scalar within a map block is dirt cheap both in terms of memory and execution speed. Perl is probably gonna do something like that internally anyway, it just won't have a "name". If assigning a lexical name makes the code more clear, then why not?
In this thread, I think the OP has some confusion about maps and foreach loops. So I showed a couple of ways for each significant loop in the code.
In reply to Re^3: join string in 2D array
by Marshall
in thread join string in 2D array
by Newbie95
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |