And the thought crossed my mind:
What's the most TIMTOWTDI thing you can do? ie, what action can you perform in Perl in the most distinct ways?
Eg, string concatenation:
That's 5 distinct (some slightly silly) ways to do it.$concat = $a.$b $concat = "$a$b" $concat = join '', $a, $b; $concat = sprintf("%s%s",$a,$b); # silly $concat =~ s/.*/$a$b/s; # sillier!
Get your thinking caps on... And no cheating! :-) - eg, manipulating $a and $b first so you can then feed them into another function.
Is this golf? Na, it's Perl Pooltm
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The most TIMTOWTDI thing you can do
by blakem (Monsignor) on Oct 23, 2001 at 10:04 UTC | |
by Biker (Priest) on Oct 24, 2001 at 20:33 UTC | |
by blakem (Monsignor) on Oct 24, 2001 at 21:18 UTC | |
|
Re: The most TIMTOWTDI thing you can do
by one4k4 (Hermit) on Oct 23, 2001 at 23:36 UTC | |
|
Re: The most TIMTOWTDI thing you can do
by demerphq (Chancellor) on Oct 25, 2001 at 15:32 UTC |