in reply to From Array 2 string
The equivalent to your code is, as others have pointed out:
$str = join( '', @arr );
Please read the docs on join. You could also do:
{ local $" = ''; # see perlvar $str = "@arr"; }
Which might be faster. See perlvar. Also check out Data::Dumper - even if its format is not what you want, the code inside might be enlightening with regard to creating string representations of various variable types.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: From Array 2 string
by ikegami (Patriarch) on Nov 15, 2005 at 18:41 UTC | |
by Aristotle (Chancellor) on Nov 15, 2005 at 19:23 UTC |