|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: my $var = join('|',@array) not behavingby ikegami (Patriarch) |
| on May 09, 2008 at 02:18 UTC ( [id://685585]=note: print w/replies, xml ) | Need Help?? |
|
Always pass a scalar to Dumper. If you had done print Dumper(\@array);, it would have been easier to notice the array contains only one element (a reference to an array containing three elements). The problem is that
The [ ] operator creates an array and returns a reference to that array. Not what you want at all. You just wanted to build a list.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||