in reply to From Array 2 string

Sure.

$;=sub{$\};my@x=map{my($x,$y)=($;,$_);$;= sub{$x->().$y}}@arr;;my$str=($x[-1]->());

Or you could just use join, but what fun is that?

Replies are listed 'Best First'.
Re^2: From Array 2 string
by tirwhan (Abbot) on Nov 15, 2005 at 19:20 UTC

    This is just the kind of code that gives PERL a bad reputation as a write-only language. PERL is dying because of posts like this. You should use existing code from CPAN instead of inventing your own convoluted methods:

    use Array::Autojoin; my $str=mkarray(@arr); print "$str";
    </sarcasm>(just in case ;-)

    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan