|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: my $var = join('|',@array) not behavingby ww (Archbishop) |
| on May 09, 2008 at 02:39 UTC ( [id://685590]=note: print w/replies, xml ) | Need Help?? |
|
Update What follows is mostly true (save the striken phrase), but see the answers above. I misread the square brackets as parens (probably because that'swhat I expected... which goes to show, if nothing else, that seeing what one expects rather than what exists is a source of many errors. join expects a list. From perldoc -f join: join EXPR,LIST Your @array is not a list. Rather, in this case See References quick reference.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||