in reply to The most TIMTOWTDI thing you can do

Just off the top of my head:
1.) ($concat = $a) .= $b;
perhaps more will follow. (and they did....)
2.) $" = $b; @_ = ($a,undef); $concat = "@_"; 3.) do { $concat .= $_ for (split(//))} for ($a,$b); 4.) my %a = ($a => $b); $concat = join'',each %a; 5.) $concat =~ s//$a/; $concat =~ s/$/$b/; 6.) $concat = <<"EOF"; chomp($concat); $a$b EOF 7.) $concat = `echo -n "$a$b"`; # for safe values of $a and $b 8.) $concat = glob("{$a}{$b}"); # not Taint safe... will choke on met +achars... 9.) ($concat) = ("$a$b" =~ /(.*)/); And finally, everyones favorite Perl6 construct... 10.) $concat = $a _ $b;

Update: Ok, now I get it... you want us to pick a simple operation and try to find $MAX+1 ways to do it, not necessarily just find other ways to do a concat. In that case, I'll set the original $MAX rather high by pointing at Adding 2 + 2, which ties perl-based-dynamic-webpage-templating-systems for the most most "ways to do it."

Update2: Added a few more to the list...

-Blake

Replies are listed 'Best First'.
Re: Re: The most TIMTOWTDI thing you can do
by Biker (Priest) on Oct 24, 2001 at 20:33 UTC

    10.) $concat = $a _ $b;

    OK, I'll stick out my neck.
    Where can I RTFM on this _ operator(?)?

    f--k the world!!!!
    /dev/world has reached maximal mount count, check forced.